mavlink/home/runner/work/rust-mavlink/rust-mavlink/target/debug/build/mavlink-e8dce79953a38a31/out/
asluav.rs

1#![doc = "MAVLink ASLUAV dialect."]
2#![doc = ""]
3#![doc = "This file was automatically generated, do not edit."]
4#![allow(deprecated)]
5#[cfg(feature = "arbitrary")]
6use arbitrary::Arbitrary;
7#[allow(unused_imports)]
8use bitflags::bitflags;
9use mavlink_core::{bytes::Bytes, bytes_mut::BytesMut, MavlinkVersion, Message, MessageData};
10#[allow(unused_imports)]
11use num_derive::FromPrimitive;
12#[allow(unused_imports)]
13use num_derive::ToPrimitive;
14#[allow(unused_imports)]
15use num_traits::FromPrimitive;
16#[allow(unused_imports)]
17use num_traits::ToPrimitive;
18#[cfg(feature = "serde")]
19use serde::{Deserialize, Serialize};
20#[cfg(feature = "ts")]
21use ts_rs::TS;
22pub const MINOR_MAVLINK_VERSION: u8 = 3u8;
23#[cfg_attr(feature = "ts", derive(TS))]
24#[cfg_attr(feature = "ts", ts(export))]
25#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
26#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27#[cfg_attr(feature = "serde", serde(tag = "type"))]
28#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29#[repr(u32)]
30#[doc = "Actuator configuration, used to change a setting on an actuator. Component information metadata can be used to know which outputs support which commands."]
31pub enum ActuatorConfiguration {
32    #[doc = "Do nothing."]
33    ACTUATOR_CONFIGURATION_NONE = 0,
34    #[doc = "Command the actuator to beep now."]
35    ACTUATOR_CONFIGURATION_BEEP = 1,
36    #[doc = "Permanently set the actuator (ESC) to 3D mode (reversible thrust)."]
37    ACTUATOR_CONFIGURATION_3D_MODE_ON = 2,
38    #[doc = "Permanently set the actuator (ESC) to non 3D mode (non-reversible thrust)."]
39    ACTUATOR_CONFIGURATION_3D_MODE_OFF = 3,
40    #[doc = "Permanently set the actuator (ESC) to spin direction 1 (which can be clockwise or counter-clockwise)."]
41    ACTUATOR_CONFIGURATION_SPIN_DIRECTION1 = 4,
42    #[doc = "Permanently set the actuator (ESC) to spin direction 2 (opposite of direction 1)."]
43    ACTUATOR_CONFIGURATION_SPIN_DIRECTION2 = 5,
44}
45impl ActuatorConfiguration {
46    pub const DEFAULT: Self = Self::ACTUATOR_CONFIGURATION_NONE;
47}
48impl Default for ActuatorConfiguration {
49    fn default() -> Self {
50        Self::DEFAULT
51    }
52}
53#[cfg_attr(feature = "ts", derive(TS))]
54#[cfg_attr(feature = "ts", ts(export))]
55#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
56#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
57#[cfg_attr(feature = "serde", serde(tag = "type"))]
58#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
59#[repr(u32)]
60#[doc = "Actuator output function. Values greater or equal to 1000 are autopilot-specific."]
61pub enum ActuatorOutputFunction {
62    #[doc = "No function (disabled)."]
63    ACTUATOR_OUTPUT_FUNCTION_NONE = 0,
64    #[doc = "Motor 1"]
65    ACTUATOR_OUTPUT_FUNCTION_MOTOR1 = 1,
66    #[doc = "Motor 2"]
67    ACTUATOR_OUTPUT_FUNCTION_MOTOR2 = 2,
68    #[doc = "Motor 3"]
69    ACTUATOR_OUTPUT_FUNCTION_MOTOR3 = 3,
70    #[doc = "Motor 4"]
71    ACTUATOR_OUTPUT_FUNCTION_MOTOR4 = 4,
72    #[doc = "Motor 5"]
73    ACTUATOR_OUTPUT_FUNCTION_MOTOR5 = 5,
74    #[doc = "Motor 6"]
75    ACTUATOR_OUTPUT_FUNCTION_MOTOR6 = 6,
76    #[doc = "Motor 7"]
77    ACTUATOR_OUTPUT_FUNCTION_MOTOR7 = 7,
78    #[doc = "Motor 8"]
79    ACTUATOR_OUTPUT_FUNCTION_MOTOR8 = 8,
80    #[doc = "Motor 9"]
81    ACTUATOR_OUTPUT_FUNCTION_MOTOR9 = 9,
82    #[doc = "Motor 10"]
83    ACTUATOR_OUTPUT_FUNCTION_MOTOR10 = 10,
84    #[doc = "Motor 11"]
85    ACTUATOR_OUTPUT_FUNCTION_MOTOR11 = 11,
86    #[doc = "Motor 12"]
87    ACTUATOR_OUTPUT_FUNCTION_MOTOR12 = 12,
88    #[doc = "Motor 13"]
89    ACTUATOR_OUTPUT_FUNCTION_MOTOR13 = 13,
90    #[doc = "Motor 14"]
91    ACTUATOR_OUTPUT_FUNCTION_MOTOR14 = 14,
92    #[doc = "Motor 15"]
93    ACTUATOR_OUTPUT_FUNCTION_MOTOR15 = 15,
94    #[doc = "Motor 16"]
95    ACTUATOR_OUTPUT_FUNCTION_MOTOR16 = 16,
96    #[doc = "Servo 1"]
97    ACTUATOR_OUTPUT_FUNCTION_SERVO1 = 33,
98    #[doc = "Servo 2"]
99    ACTUATOR_OUTPUT_FUNCTION_SERVO2 = 34,
100    #[doc = "Servo 3"]
101    ACTUATOR_OUTPUT_FUNCTION_SERVO3 = 35,
102    #[doc = "Servo 4"]
103    ACTUATOR_OUTPUT_FUNCTION_SERVO4 = 36,
104    #[doc = "Servo 5"]
105    ACTUATOR_OUTPUT_FUNCTION_SERVO5 = 37,
106    #[doc = "Servo 6"]
107    ACTUATOR_OUTPUT_FUNCTION_SERVO6 = 38,
108    #[doc = "Servo 7"]
109    ACTUATOR_OUTPUT_FUNCTION_SERVO7 = 39,
110    #[doc = "Servo 8"]
111    ACTUATOR_OUTPUT_FUNCTION_SERVO8 = 40,
112    #[doc = "Servo 9"]
113    ACTUATOR_OUTPUT_FUNCTION_SERVO9 = 41,
114    #[doc = "Servo 10"]
115    ACTUATOR_OUTPUT_FUNCTION_SERVO10 = 42,
116    #[doc = "Servo 11"]
117    ACTUATOR_OUTPUT_FUNCTION_SERVO11 = 43,
118    #[doc = "Servo 12"]
119    ACTUATOR_OUTPUT_FUNCTION_SERVO12 = 44,
120    #[doc = "Servo 13"]
121    ACTUATOR_OUTPUT_FUNCTION_SERVO13 = 45,
122    #[doc = "Servo 14"]
123    ACTUATOR_OUTPUT_FUNCTION_SERVO14 = 46,
124    #[doc = "Servo 15"]
125    ACTUATOR_OUTPUT_FUNCTION_SERVO15 = 47,
126    #[doc = "Servo 16"]
127    ACTUATOR_OUTPUT_FUNCTION_SERVO16 = 48,
128}
129impl ActuatorOutputFunction {
130    pub const DEFAULT: Self = Self::ACTUATOR_OUTPUT_FUNCTION_NONE;
131}
132impl Default for ActuatorOutputFunction {
133    fn default() -> Self {
134        Self::DEFAULT
135    }
136}
137#[cfg_attr(feature = "ts", derive(TS))]
138#[cfg_attr(feature = "ts", ts(export))]
139#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
140#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
141#[cfg_attr(feature = "serde", serde(tag = "type"))]
142#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
143#[repr(u32)]
144#[doc = "Enumeration of the ADSB altimeter types"]
145pub enum AdsbAltitudeType {
146    #[doc = "Altitude reported from a Baro source using QNH reference"]
147    ADSB_ALTITUDE_TYPE_PRESSURE_QNH = 0,
148    #[doc = "Altitude reported from a GNSS source"]
149    ADSB_ALTITUDE_TYPE_GEOMETRIC = 1,
150}
151impl AdsbAltitudeType {
152    pub const DEFAULT: Self = Self::ADSB_ALTITUDE_TYPE_PRESSURE_QNH;
153}
154impl Default for AdsbAltitudeType {
155    fn default() -> Self {
156        Self::DEFAULT
157    }
158}
159#[cfg_attr(feature = "ts", derive(TS))]
160#[cfg_attr(feature = "ts", ts(export))]
161#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
162#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
163#[cfg_attr(feature = "serde", serde(tag = "type"))]
164#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
165#[repr(u32)]
166#[doc = "ADSB classification for the type of vehicle emitting the transponder signal"]
167pub enum AdsbEmitterType {
168    ADSB_EMITTER_TYPE_NO_INFO = 0,
169    ADSB_EMITTER_TYPE_LIGHT = 1,
170    ADSB_EMITTER_TYPE_SMALL = 2,
171    ADSB_EMITTER_TYPE_LARGE = 3,
172    ADSB_EMITTER_TYPE_HIGH_VORTEX_LARGE = 4,
173    ADSB_EMITTER_TYPE_HEAVY = 5,
174    ADSB_EMITTER_TYPE_HIGHLY_MANUV = 6,
175    ADSB_EMITTER_TYPE_ROTOCRAFT = 7,
176    ADSB_EMITTER_TYPE_UNASSIGNED = 8,
177    ADSB_EMITTER_TYPE_GLIDER = 9,
178    ADSB_EMITTER_TYPE_LIGHTER_AIR = 10,
179    ADSB_EMITTER_TYPE_PARACHUTE = 11,
180    ADSB_EMITTER_TYPE_ULTRA_LIGHT = 12,
181    ADSB_EMITTER_TYPE_UNASSIGNED2 = 13,
182    ADSB_EMITTER_TYPE_UAV = 14,
183    ADSB_EMITTER_TYPE_SPACE = 15,
184    ADSB_EMITTER_TYPE_UNASSGINED3 = 16,
185    ADSB_EMITTER_TYPE_EMERGENCY_SURFACE = 17,
186    ADSB_EMITTER_TYPE_SERVICE_SURFACE = 18,
187    ADSB_EMITTER_TYPE_POINT_OBSTACLE = 19,
188}
189impl AdsbEmitterType {
190    pub const DEFAULT: Self = Self::ADSB_EMITTER_TYPE_NO_INFO;
191}
192impl Default for AdsbEmitterType {
193    fn default() -> Self {
194        Self::DEFAULT
195    }
196}
197bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags indicate status such as data validity of each data source. Set = data valid"] pub struct AdsbFlags : u16 { const ADSB_FLAGS_VALID_COORDS = 1 ; const ADSB_FLAGS_VALID_ALTITUDE = 2 ; const ADSB_FLAGS_VALID_HEADING = 4 ; const ADSB_FLAGS_VALID_VELOCITY = 8 ; const ADSB_FLAGS_VALID_CALLSIGN = 16 ; const ADSB_FLAGS_VALID_SQUAWK = 32 ; const ADSB_FLAGS_SIMULATED = 64 ; const ADSB_FLAGS_VERTICAL_VELOCITY_VALID = 128 ; const ADSB_FLAGS_BARO_VALID = 256 ; const ADSB_FLAGS_SOURCE_UAT = 32768 ; } }
198impl AdsbFlags {
199    pub const DEFAULT: Self = Self::ADSB_FLAGS_VALID_COORDS;
200}
201impl Default for AdsbFlags {
202    fn default() -> Self {
203        Self::DEFAULT
204    }
205}
206bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags are used in the AIS_VESSEL.fields bitmask to indicate validity of data in the other message fields. When set, the data is valid."] pub struct AisFlags : u16 { # [doc = "1 = Position accuracy less than 10m, 0 = position accuracy greater than 10m."] const AIS_FLAGS_POSITION_ACCURACY = 1 ; const AIS_FLAGS_VALID_COG = 2 ; const AIS_FLAGS_VALID_VELOCITY = 4 ; # [doc = "1 = Velocity over 52.5765m/s (102.2 knots)"] const AIS_FLAGS_HIGH_VELOCITY = 8 ; const AIS_FLAGS_VALID_TURN_RATE = 16 ; # [doc = "Only the sign of the returned turn rate value is valid, either greater than 5deg/30s or less than -5deg/30s"] const AIS_FLAGS_TURN_RATE_SIGN_ONLY = 32 ; const AIS_FLAGS_VALID_DIMENSIONS = 64 ; # [doc = "Distance to bow is larger than 511m"] const AIS_FLAGS_LARGE_BOW_DIMENSION = 128 ; # [doc = "Distance to stern is larger than 511m"] const AIS_FLAGS_LARGE_STERN_DIMENSION = 256 ; # [doc = "Distance to port side is larger than 63m"] const AIS_FLAGS_LARGE_PORT_DIMENSION = 512 ; # [doc = "Distance to starboard side is larger than 63m"] const AIS_FLAGS_LARGE_STARBOARD_DIMENSION = 1024 ; const AIS_FLAGS_VALID_CALLSIGN = 2048 ; const AIS_FLAGS_VALID_NAME = 4096 ; } }
207impl AisFlags {
208    pub const DEFAULT: Self = Self::AIS_FLAGS_POSITION_ACCURACY;
209}
210impl Default for AisFlags {
211    fn default() -> Self {
212        Self::DEFAULT
213    }
214}
215#[cfg_attr(feature = "ts", derive(TS))]
216#[cfg_attr(feature = "ts", ts(export))]
217#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
218#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
219#[cfg_attr(feature = "serde", serde(tag = "type"))]
220#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
221#[repr(u32)]
222#[doc = "Navigational status of AIS vessel, enum duplicated from AIS standard, <https://gpsd.gitlab.io/gpsd/AIVDM.html>"]
223pub enum AisNavStatus {
224    #[doc = "Under way using engine."]
225    UNDER_WAY = 0,
226    AIS_NAV_ANCHORED = 1,
227    AIS_NAV_UN_COMMANDED = 2,
228    AIS_NAV_RESTRICTED_MANOEUVERABILITY = 3,
229    AIS_NAV_DRAUGHT_CONSTRAINED = 4,
230    AIS_NAV_MOORED = 5,
231    AIS_NAV_AGROUND = 6,
232    AIS_NAV_FISHING = 7,
233    AIS_NAV_SAILING = 8,
234    AIS_NAV_RESERVED_HSC = 9,
235    AIS_NAV_RESERVED_WIG = 10,
236    AIS_NAV_RESERVED_1 = 11,
237    AIS_NAV_RESERVED_2 = 12,
238    AIS_NAV_RESERVED_3 = 13,
239    #[doc = "Search And Rescue Transponder."]
240    AIS_NAV_AIS_SART = 14,
241    #[doc = "Not available (default)."]
242    AIS_NAV_UNKNOWN = 15,
243}
244impl AisNavStatus {
245    pub const DEFAULT: Self = Self::UNDER_WAY;
246}
247impl Default for AisNavStatus {
248    fn default() -> Self {
249        Self::DEFAULT
250    }
251}
252#[cfg_attr(feature = "ts", derive(TS))]
253#[cfg_attr(feature = "ts", ts(export))]
254#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
255#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
256#[cfg_attr(feature = "serde", serde(tag = "type"))]
257#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
258#[repr(u32)]
259#[doc = "Type of AIS vessel, enum duplicated from AIS standard, <https://gpsd.gitlab.io/gpsd/AIVDM.html>"]
260pub enum AisType {
261    #[doc = "Not available (default)."]
262    AIS_TYPE_UNKNOWN = 0,
263    AIS_TYPE_RESERVED_1 = 1,
264    AIS_TYPE_RESERVED_2 = 2,
265    AIS_TYPE_RESERVED_3 = 3,
266    AIS_TYPE_RESERVED_4 = 4,
267    AIS_TYPE_RESERVED_5 = 5,
268    AIS_TYPE_RESERVED_6 = 6,
269    AIS_TYPE_RESERVED_7 = 7,
270    AIS_TYPE_RESERVED_8 = 8,
271    AIS_TYPE_RESERVED_9 = 9,
272    AIS_TYPE_RESERVED_10 = 10,
273    AIS_TYPE_RESERVED_11 = 11,
274    AIS_TYPE_RESERVED_12 = 12,
275    AIS_TYPE_RESERVED_13 = 13,
276    AIS_TYPE_RESERVED_14 = 14,
277    AIS_TYPE_RESERVED_15 = 15,
278    AIS_TYPE_RESERVED_16 = 16,
279    AIS_TYPE_RESERVED_17 = 17,
280    AIS_TYPE_RESERVED_18 = 18,
281    AIS_TYPE_RESERVED_19 = 19,
282    #[doc = "Wing In Ground effect."]
283    AIS_TYPE_WIG = 20,
284    AIS_TYPE_WIG_HAZARDOUS_A = 21,
285    AIS_TYPE_WIG_HAZARDOUS_B = 22,
286    AIS_TYPE_WIG_HAZARDOUS_C = 23,
287    AIS_TYPE_WIG_HAZARDOUS_D = 24,
288    AIS_TYPE_WIG_RESERVED_1 = 25,
289    AIS_TYPE_WIG_RESERVED_2 = 26,
290    AIS_TYPE_WIG_RESERVED_3 = 27,
291    AIS_TYPE_WIG_RESERVED_4 = 28,
292    AIS_TYPE_WIG_RESERVED_5 = 29,
293    AIS_TYPE_FISHING = 30,
294    AIS_TYPE_TOWING = 31,
295    #[doc = "Towing: length exceeds 200m or breadth exceeds 25m."]
296    AIS_TYPE_TOWING_LARGE = 32,
297    #[doc = "Dredging or other underwater ops."]
298    AIS_TYPE_DREDGING = 33,
299    AIS_TYPE_DIVING = 34,
300    AIS_TYPE_MILITARY = 35,
301    AIS_TYPE_SAILING = 36,
302    AIS_TYPE_PLEASURE = 37,
303    AIS_TYPE_RESERVED_20 = 38,
304    AIS_TYPE_RESERVED_21 = 39,
305    #[doc = "High Speed Craft."]
306    AIS_TYPE_HSC = 40,
307    AIS_TYPE_HSC_HAZARDOUS_A = 41,
308    AIS_TYPE_HSC_HAZARDOUS_B = 42,
309    AIS_TYPE_HSC_HAZARDOUS_C = 43,
310    AIS_TYPE_HSC_HAZARDOUS_D = 44,
311    AIS_TYPE_HSC_RESERVED_1 = 45,
312    AIS_TYPE_HSC_RESERVED_2 = 46,
313    AIS_TYPE_HSC_RESERVED_3 = 47,
314    AIS_TYPE_HSC_RESERVED_4 = 48,
315    AIS_TYPE_HSC_UNKNOWN = 49,
316    AIS_TYPE_PILOT = 50,
317    #[doc = "Search And Rescue vessel."]
318    AIS_TYPE_SAR = 51,
319    AIS_TYPE_TUG = 52,
320    AIS_TYPE_PORT_TENDER = 53,
321    #[doc = "Anti-pollution equipment."]
322    AIS_TYPE_ANTI_POLLUTION = 54,
323    AIS_TYPE_LAW_ENFORCEMENT = 55,
324    AIS_TYPE_SPARE_LOCAL_1 = 56,
325    AIS_TYPE_SPARE_LOCAL_2 = 57,
326    AIS_TYPE_MEDICAL_TRANSPORT = 58,
327    #[doc = "Noncombatant ship according to RR Resolution No. 18."]
328    AIS_TYPE_NONECOMBATANT = 59,
329    AIS_TYPE_PASSENGER = 60,
330    AIS_TYPE_PASSENGER_HAZARDOUS_A = 61,
331    AIS_TYPE_PASSENGER_HAZARDOUS_B = 62,
332    AIS_TYPE_PASSENGER_HAZARDOUS_C = 63,
333    AIS_TYPE_PASSENGER_HAZARDOUS_D = 64,
334    AIS_TYPE_PASSENGER_RESERVED_1 = 65,
335    AIS_TYPE_PASSENGER_RESERVED_2 = 66,
336    AIS_TYPE_PASSENGER_RESERVED_3 = 67,
337    AIS_TYPE_PASSENGER_RESERVED_4 = 68,
338    AIS_TYPE_PASSENGER_UNKNOWN = 69,
339    AIS_TYPE_CARGO = 70,
340    AIS_TYPE_CARGO_HAZARDOUS_A = 71,
341    AIS_TYPE_CARGO_HAZARDOUS_B = 72,
342    AIS_TYPE_CARGO_HAZARDOUS_C = 73,
343    AIS_TYPE_CARGO_HAZARDOUS_D = 74,
344    AIS_TYPE_CARGO_RESERVED_1 = 75,
345    AIS_TYPE_CARGO_RESERVED_2 = 76,
346    AIS_TYPE_CARGO_RESERVED_3 = 77,
347    AIS_TYPE_CARGO_RESERVED_4 = 78,
348    AIS_TYPE_CARGO_UNKNOWN = 79,
349    AIS_TYPE_TANKER = 80,
350    AIS_TYPE_TANKER_HAZARDOUS_A = 81,
351    AIS_TYPE_TANKER_HAZARDOUS_B = 82,
352    AIS_TYPE_TANKER_HAZARDOUS_C = 83,
353    AIS_TYPE_TANKER_HAZARDOUS_D = 84,
354    AIS_TYPE_TANKER_RESERVED_1 = 85,
355    AIS_TYPE_TANKER_RESERVED_2 = 86,
356    AIS_TYPE_TANKER_RESERVED_3 = 87,
357    AIS_TYPE_TANKER_RESERVED_4 = 88,
358    AIS_TYPE_TANKER_UNKNOWN = 89,
359    AIS_TYPE_OTHER = 90,
360    AIS_TYPE_OTHER_HAZARDOUS_A = 91,
361    AIS_TYPE_OTHER_HAZARDOUS_B = 92,
362    AIS_TYPE_OTHER_HAZARDOUS_C = 93,
363    AIS_TYPE_OTHER_HAZARDOUS_D = 94,
364    AIS_TYPE_OTHER_RESERVED_1 = 95,
365    AIS_TYPE_OTHER_RESERVED_2 = 96,
366    AIS_TYPE_OTHER_RESERVED_3 = 97,
367    AIS_TYPE_OTHER_RESERVED_4 = 98,
368    AIS_TYPE_OTHER_UNKNOWN = 99,
369}
370impl AisType {
371    pub const DEFAULT: Self = Self::AIS_TYPE_UNKNOWN;
372}
373impl Default for AisType {
374    fn default() -> Self {
375        Self::DEFAULT
376    }
377}
378bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmap to indicate which dimensions should be ignored by the vehicle: a value of 0b00000000 indicates that none of the setpoint dimensions should be ignored."] pub struct AttitudeTargetTypemask : u8 { # [doc = "Ignore body roll rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_ROLL_RATE_IGNORE = 1 ; # [doc = "Ignore body pitch rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_PITCH_RATE_IGNORE = 2 ; # [doc = "Ignore body yaw rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_YAW_RATE_IGNORE = 4 ; # [doc = "Use 3D body thrust setpoint instead of throttle"] const ATTITUDE_TARGET_TYPEMASK_THRUST_BODY_SET = 32 ; # [doc = "Ignore throttle"] const ATTITUDE_TARGET_TYPEMASK_THROTTLE_IGNORE = 64 ; # [doc = "Ignore attitude"] const ATTITUDE_TARGET_TYPEMASK_ATTITUDE_IGNORE = 128 ; } }
379impl AttitudeTargetTypemask {
380    pub const DEFAULT: Self = Self::ATTITUDE_TARGET_TYPEMASK_BODY_ROLL_RATE_IGNORE;
381}
382impl Default for AttitudeTargetTypemask {
383    fn default() -> Self {
384        Self::DEFAULT
385    }
386}
387#[cfg_attr(feature = "ts", derive(TS))]
388#[cfg_attr(feature = "ts", ts(export))]
389#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
390#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
391#[cfg_attr(feature = "serde", serde(tag = "type"))]
392#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
393#[repr(u32)]
394#[doc = "Axes that will be autotuned by MAV_CMD_DO_AUTOTUNE_ENABLE.         Note that at least one flag must be set in MAV_CMD_DO_AUTOTUNE_ENABLE.param2: if none are set, the flight stack will tune its default set of axes."]
395pub enum AutotuneAxis {
396    #[doc = "Autotune roll axis."]
397    AUTOTUNE_AXIS_ROLL = 1,
398    #[doc = "Autotune pitch axis."]
399    AUTOTUNE_AXIS_PITCH = 2,
400    #[doc = "Autotune yaw axis."]
401    AUTOTUNE_AXIS_YAW = 4,
402}
403impl AutotuneAxis {
404    pub const DEFAULT: Self = Self::AUTOTUNE_AXIS_ROLL;
405}
406impl Default for AutotuneAxis {
407    fn default() -> Self {
408        Self::DEFAULT
409    }
410}
411bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Camera capability flags (Bitmap)"] pub struct CameraCapFlags : u32 { # [doc = "Camera is able to record video"] const CAMERA_CAP_FLAGS_CAPTURE_VIDEO = 1 ; # [doc = "Camera is able to capture images"] const CAMERA_CAP_FLAGS_CAPTURE_IMAGE = 2 ; # [doc = "Camera has separate Video and Image/Photo modes (MAV_CMD_SET_CAMERA_MODE)"] const CAMERA_CAP_FLAGS_HAS_MODES = 4 ; # [doc = "Camera can capture images while in video mode"] const CAMERA_CAP_FLAGS_CAN_CAPTURE_IMAGE_IN_VIDEO_MODE = 8 ; # [doc = "Camera can capture videos while in Photo/Image mode"] const CAMERA_CAP_FLAGS_CAN_CAPTURE_VIDEO_IN_IMAGE_MODE = 16 ; # [doc = "Camera has image survey mode (MAV_CMD_SET_CAMERA_MODE)"] const CAMERA_CAP_FLAGS_HAS_IMAGE_SURVEY_MODE = 32 ; # [doc = "Camera has basic zoom control (MAV_CMD_SET_CAMERA_ZOOM)"] const CAMERA_CAP_FLAGS_HAS_BASIC_ZOOM = 64 ; # [doc = "Camera has basic focus control (MAV_CMD_SET_CAMERA_FOCUS)"] const CAMERA_CAP_FLAGS_HAS_BASIC_FOCUS = 128 ; # [doc = "Camera has video streaming capabilities (request VIDEO_STREAM_INFORMATION with MAV_CMD_REQUEST_MESSAGE for video streaming info)"] const CAMERA_CAP_FLAGS_HAS_VIDEO_STREAM = 256 ; # [doc = "Camera supports tracking of a point on the camera view."] const CAMERA_CAP_FLAGS_HAS_TRACKING_POINT = 512 ; # [doc = "Camera supports tracking of a selection rectangle on the camera view."] const CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE = 1024 ; # [doc = "Camera supports tracking geo status (CAMERA_TRACKING_GEO_STATUS)."] const CAMERA_CAP_FLAGS_HAS_TRACKING_GEO_STATUS = 2048 ; # [doc = "Camera supports absolute thermal range (request CAMERA_THERMAL_RANGE with MAV_CMD_REQUEST_MESSAGE)."] const CAMERA_CAP_FLAGS_HAS_THERMAL_RANGE = 4096 ; } }
412impl CameraCapFlags {
413    pub const DEFAULT: Self = Self::CAMERA_CAP_FLAGS_CAPTURE_VIDEO;
414}
415impl Default for CameraCapFlags {
416    fn default() -> Self {
417        Self::DEFAULT
418    }
419}
420#[cfg_attr(feature = "ts", derive(TS))]
421#[cfg_attr(feature = "ts", ts(export))]
422#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
423#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
424#[cfg_attr(feature = "serde", serde(tag = "type"))]
425#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
426#[repr(u32)]
427#[doc = "Camera Modes."]
428pub enum CameraMode {
429    #[doc = "Camera is in image/photo capture mode."]
430    CAMERA_MODE_IMAGE = 0,
431    #[doc = "Camera is in video capture mode."]
432    CAMERA_MODE_VIDEO = 1,
433    #[doc = "Camera is in image survey capture mode. It allows for camera controller to do specific settings for surveys."]
434    CAMERA_MODE_IMAGE_SURVEY = 2,
435}
436impl CameraMode {
437    pub const DEFAULT: Self = Self::CAMERA_MODE_IMAGE;
438}
439impl Default for CameraMode {
440    fn default() -> Self {
441        Self::DEFAULT
442    }
443}
444#[cfg_attr(feature = "ts", derive(TS))]
445#[cfg_attr(feature = "ts", ts(export))]
446#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
447#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
448#[cfg_attr(feature = "serde", serde(tag = "type"))]
449#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
450#[repr(u32)]
451#[doc = "Camera sources for MAV_CMD_SET_CAMERA_SOURCE"]
452pub enum CameraSource {
453    #[doc = "Default camera source."]
454    CAMERA_SOURCE_DEFAULT = 0,
455    #[doc = "RGB camera source."]
456    CAMERA_SOURCE_RGB = 1,
457    #[doc = "IR camera source."]
458    CAMERA_SOURCE_IR = 2,
459    #[doc = "NDVI camera source."]
460    CAMERA_SOURCE_NDVI = 3,
461}
462impl CameraSource {
463    pub const DEFAULT: Self = Self::CAMERA_SOURCE_DEFAULT;
464}
465impl Default for CameraSource {
466    fn default() -> Self {
467        Self::DEFAULT
468    }
469}
470#[cfg_attr(feature = "ts", derive(TS))]
471#[cfg_attr(feature = "ts", ts(export))]
472#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
473#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
474#[cfg_attr(feature = "serde", serde(tag = "type"))]
475#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
476#[repr(u32)]
477#[doc = "Camera tracking modes"]
478pub enum CameraTrackingMode {
479    #[doc = "Not tracking"]
480    CAMERA_TRACKING_MODE_NONE = 0,
481    #[doc = "Target is a point"]
482    CAMERA_TRACKING_MODE_POINT = 1,
483    #[doc = "Target is a rectangle"]
484    CAMERA_TRACKING_MODE_RECTANGLE = 2,
485}
486impl CameraTrackingMode {
487    pub const DEFAULT: Self = Self::CAMERA_TRACKING_MODE_NONE;
488}
489impl Default for CameraTrackingMode {
490    fn default() -> Self {
491        Self::DEFAULT
492    }
493}
494#[cfg_attr(feature = "ts", derive(TS))]
495#[cfg_attr(feature = "ts", ts(export))]
496#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
497#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
498#[cfg_attr(feature = "serde", serde(tag = "type"))]
499#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
500#[repr(u32)]
501#[doc = "Camera tracking status flags"]
502pub enum CameraTrackingStatusFlags {
503    #[doc = "Camera is not tracking"]
504    CAMERA_TRACKING_STATUS_FLAGS_IDLE = 0,
505    #[doc = "Camera is tracking"]
506    CAMERA_TRACKING_STATUS_FLAGS_ACTIVE = 1,
507    #[doc = "Camera tracking in error state"]
508    CAMERA_TRACKING_STATUS_FLAGS_ERROR = 2,
509}
510impl CameraTrackingStatusFlags {
511    pub const DEFAULT: Self = Self::CAMERA_TRACKING_STATUS_FLAGS_IDLE;
512}
513impl Default for CameraTrackingStatusFlags {
514    fn default() -> Self {
515        Self::DEFAULT
516    }
517}
518bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Camera tracking target data (shows where tracked target is within image)"] pub struct CameraTrackingTargetData : u8 { # [doc = "Target data embedded in image data (proprietary)"] const CAMERA_TRACKING_TARGET_DATA_EMBEDDED = 1 ; # [doc = "Target data rendered in image"] const CAMERA_TRACKING_TARGET_DATA_RENDERED = 2 ; # [doc = "Target data within status message (Point or Rectangle)"] const CAMERA_TRACKING_TARGET_DATA_IN_STATUS = 4 ; } }
519impl CameraTrackingTargetData {
520    pub const DEFAULT: Self = Self::CAMERA_TRACKING_TARGET_DATA_EMBEDDED;
521}
522impl Default for CameraTrackingTargetData {
523    fn default() -> Self {
524        Self::DEFAULT
525    }
526}
527#[cfg_attr(feature = "ts", derive(TS))]
528#[cfg_attr(feature = "ts", ts(export))]
529#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
530#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
531#[cfg_attr(feature = "serde", serde(tag = "type"))]
532#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
533#[repr(u32)]
534#[doc = "Zoom types for MAV_CMD_SET_CAMERA_ZOOM"]
535pub enum CameraZoomType {
536    #[doc = "Zoom one step increment (-1 for wide, 1 for tele)"]
537    ZOOM_TYPE_STEP = 0,
538    #[doc = "Continuous normalized zoom in/out rate until stopped. Range -1..1, negative: wide, positive: narrow/tele, 0 to stop zooming. Other values should be clipped to the range."]
539    ZOOM_TYPE_CONTINUOUS = 1,
540    #[doc = "Zoom value as proportion of full camera range (a percentage value between 0.0 and 100.0)"]
541    ZOOM_TYPE_RANGE = 2,
542    #[doc = "Zoom value/variable focal length in millimetres. Note that there is no message to get the valid zoom range of the camera, so this can type can only be used for cameras where the zoom range is known (implying that this cannot reliably be used in a GCS for an arbitrary camera)"]
543    ZOOM_TYPE_FOCAL_LENGTH = 3,
544    #[doc = "Zoom value as horizontal field of view in degrees."]
545    ZOOM_TYPE_HORIZONTAL_FOV = 4,
546}
547impl CameraZoomType {
548    pub const DEFAULT: Self = Self::ZOOM_TYPE_STEP;
549}
550impl Default for CameraZoomType {
551    fn default() -> Self {
552        Self::DEFAULT
553    }
554}
555#[cfg_attr(feature = "ts", derive(TS))]
556#[cfg_attr(feature = "ts", ts(export))]
557#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
558#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
559#[cfg_attr(feature = "serde", serde(tag = "type"))]
560#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
561#[repr(u32)]
562pub enum CanFilterOp {
563    CAN_FILTER_REPLACE = 0,
564    CAN_FILTER_ADD = 1,
565    CAN_FILTER_REMOVE = 2,
566}
567impl CanFilterOp {
568    pub const DEFAULT: Self = Self::CAN_FILTER_REPLACE;
569}
570impl Default for CanFilterOp {
571    fn default() -> Self {
572        Self::DEFAULT
573    }
574}
575#[cfg_attr(feature = "ts", derive(TS))]
576#[cfg_attr(feature = "ts", ts(export))]
577#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
578#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
579#[cfg_attr(feature = "serde", serde(tag = "type"))]
580#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
581#[repr(u32)]
582#[doc = "Possible responses from a CELLULAR_CONFIG message."]
583pub enum CellularConfigResponse {
584    #[doc = "Changes accepted."]
585    CELLULAR_CONFIG_RESPONSE_ACCEPTED = 0,
586    #[doc = "Invalid APN."]
587    CELLULAR_CONFIG_RESPONSE_APN_ERROR = 1,
588    #[doc = "Invalid PIN."]
589    CELLULAR_CONFIG_RESPONSE_PIN_ERROR = 2,
590    #[doc = "Changes rejected."]
591    CELLULAR_CONFIG_RESPONSE_REJECTED = 3,
592    #[doc = "PUK is required to unblock SIM card."]
593    CELLULAR_CONFIG_BLOCKED_PUK_REQUIRED = 4,
594}
595impl CellularConfigResponse {
596    pub const DEFAULT: Self = Self::CELLULAR_CONFIG_RESPONSE_ACCEPTED;
597}
598impl Default for CellularConfigResponse {
599    fn default() -> Self {
600        Self::DEFAULT
601    }
602}
603#[cfg_attr(feature = "ts", derive(TS))]
604#[cfg_attr(feature = "ts", ts(export))]
605#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
606#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
607#[cfg_attr(feature = "serde", serde(tag = "type"))]
608#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
609#[repr(u32)]
610#[doc = "These flags are used to diagnose the failure state of CELLULAR_STATUS"]
611pub enum CellularNetworkFailedReason {
612    #[doc = "No error"]
613    CELLULAR_NETWORK_FAILED_REASON_NONE = 0,
614    #[doc = "Error state is unknown"]
615    CELLULAR_NETWORK_FAILED_REASON_UNKNOWN = 1,
616    #[doc = "SIM is required for the modem but missing"]
617    CELLULAR_NETWORK_FAILED_REASON_SIM_MISSING = 2,
618    #[doc = "SIM is available, but not usable for connection"]
619    CELLULAR_NETWORK_FAILED_REASON_SIM_ERROR = 3,
620}
621impl CellularNetworkFailedReason {
622    pub const DEFAULT: Self = Self::CELLULAR_NETWORK_FAILED_REASON_NONE;
623}
624impl Default for CellularNetworkFailedReason {
625    fn default() -> Self {
626        Self::DEFAULT
627    }
628}
629#[cfg_attr(feature = "ts", derive(TS))]
630#[cfg_attr(feature = "ts", ts(export))]
631#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
632#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
633#[cfg_attr(feature = "serde", serde(tag = "type"))]
634#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
635#[repr(u32)]
636#[doc = "Cellular network radio type"]
637pub enum CellularNetworkRadioType {
638    CELLULAR_NETWORK_RADIO_TYPE_NONE = 0,
639    CELLULAR_NETWORK_RADIO_TYPE_GSM = 1,
640    CELLULAR_NETWORK_RADIO_TYPE_CDMA = 2,
641    CELLULAR_NETWORK_RADIO_TYPE_WCDMA = 3,
642    CELLULAR_NETWORK_RADIO_TYPE_LTE = 4,
643}
644impl CellularNetworkRadioType {
645    pub const DEFAULT: Self = Self::CELLULAR_NETWORK_RADIO_TYPE_NONE;
646}
647impl Default for CellularNetworkRadioType {
648    fn default() -> Self {
649        Self::DEFAULT
650    }
651}
652#[cfg_attr(feature = "ts", derive(TS))]
653#[cfg_attr(feature = "ts", ts(export))]
654#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
655#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
656#[cfg_attr(feature = "serde", serde(tag = "type"))]
657#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
658#[repr(u32)]
659#[doc = "These flags encode the cellular network status"]
660pub enum CellularStatusFlag {
661    #[doc = "State unknown or not reportable."]
662    CELLULAR_STATUS_FLAG_UNKNOWN = 0,
663    #[doc = "Modem is unusable"]
664    CELLULAR_STATUS_FLAG_FAILED = 1,
665    #[doc = "Modem is being initialized"]
666    CELLULAR_STATUS_FLAG_INITIALIZING = 2,
667    #[doc = "Modem is locked"]
668    CELLULAR_STATUS_FLAG_LOCKED = 3,
669    #[doc = "Modem is not enabled and is powered down"]
670    CELLULAR_STATUS_FLAG_DISABLED = 4,
671    #[doc = "Modem is currently transitioning to the CELLULAR_STATUS_FLAG_DISABLED state"]
672    CELLULAR_STATUS_FLAG_DISABLING = 5,
673    #[doc = "Modem is currently transitioning to the CELLULAR_STATUS_FLAG_ENABLED state"]
674    CELLULAR_STATUS_FLAG_ENABLING = 6,
675    #[doc = "Modem is enabled and powered on but not registered with a network provider and not available for data connections"]
676    CELLULAR_STATUS_FLAG_ENABLED = 7,
677    #[doc = "Modem is searching for a network provider to register"]
678    CELLULAR_STATUS_FLAG_SEARCHING = 8,
679    #[doc = "Modem is registered with a network provider, and data connections and messaging may be available for use"]
680    CELLULAR_STATUS_FLAG_REGISTERED = 9,
681    #[doc = "Modem is disconnecting and deactivating the last active packet data bearer. This state will not be entered if more than one packet data bearer is active and one of the active bearers is deactivated"]
682    CELLULAR_STATUS_FLAG_DISCONNECTING = 10,
683    #[doc = "Modem is activating and connecting the first packet data bearer. Subsequent bearer activations when another bearer is already active do not cause this state to be entered"]
684    CELLULAR_STATUS_FLAG_CONNECTING = 11,
685    #[doc = "One or more packet data bearers is active and connected"]
686    CELLULAR_STATUS_FLAG_CONNECTED = 12,
687}
688impl CellularStatusFlag {
689    pub const DEFAULT: Self = Self::CELLULAR_STATUS_FLAG_UNKNOWN;
690}
691impl Default for CellularStatusFlag {
692    fn default() -> Self {
693        Self::DEFAULT
694    }
695}
696#[cfg_attr(feature = "ts", derive(TS))]
697#[cfg_attr(feature = "ts", ts(export))]
698#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
699#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
700#[cfg_attr(feature = "serde", serde(tag = "type"))]
701#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
702#[repr(u32)]
703#[doc = "Supported component metadata types. These are used in the \"general\" metadata file returned by COMPONENT_METADATA to provide information about supported metadata types. The types are not used directly in MAVLink messages."]
704pub enum CompMetadataType {
705    #[doc = "General information about the component. General metadata includes information about other metadata types supported by the component. Files of this type must be supported, and must be downloadable from vehicle using a MAVLink FTP URI."]
706    COMP_METADATA_TYPE_GENERAL = 0,
707    #[doc = "Parameter meta data."]
708    COMP_METADATA_TYPE_PARAMETER = 1,
709    #[doc = "Meta data that specifies which commands and command parameters the vehicle supports. (WIP)"]
710    COMP_METADATA_TYPE_COMMANDS = 2,
711    #[doc = "Meta data that specifies external non-MAVLink peripherals."]
712    COMP_METADATA_TYPE_PERIPHERALS = 3,
713    #[doc = "Meta data for the events interface."]
714    COMP_METADATA_TYPE_EVENTS = 4,
715    #[doc = "Meta data for actuator configuration (motors, servos and vehicle geometry) and testing."]
716    COMP_METADATA_TYPE_ACTUATORS = 5,
717}
718impl CompMetadataType {
719    pub const DEFAULT: Self = Self::COMP_METADATA_TYPE_GENERAL;
720}
721impl Default for CompMetadataType {
722    fn default() -> Self {
723        Self::DEFAULT
724    }
725}
726#[cfg_attr(feature = "ts", derive(TS))]
727#[cfg_attr(feature = "ts", ts(export))]
728#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
729#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
730#[cfg_attr(feature = "serde", serde(tag = "type"))]
731#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
732#[repr(u32)]
733#[doc = "Indicates the ESC connection type."]
734pub enum EscConnectionType {
735    #[doc = "Traditional PPM ESC."]
736    ESC_CONNECTION_TYPE_PPM = 0,
737    #[doc = "Serial Bus connected ESC."]
738    ESC_CONNECTION_TYPE_SERIAL = 1,
739    #[doc = "One Shot PPM ESC."]
740    ESC_CONNECTION_TYPE_ONESHOT = 2,
741    #[doc = "I2C ESC."]
742    ESC_CONNECTION_TYPE_I2C = 3,
743    #[doc = "CAN-Bus ESC."]
744    ESC_CONNECTION_TYPE_CAN = 4,
745    #[doc = "DShot ESC."]
746    ESC_CONNECTION_TYPE_DSHOT = 5,
747}
748impl EscConnectionType {
749    pub const DEFAULT: Self = Self::ESC_CONNECTION_TYPE_PPM;
750}
751impl Default for EscConnectionType {
752    fn default() -> Self {
753        Self::DEFAULT
754    }
755}
756bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report ESC failures."] pub struct EscFailureFlags : u16 { # [doc = "Over current failure."] const ESC_FAILURE_OVER_CURRENT = 1 ; # [doc = "Over voltage failure."] const ESC_FAILURE_OVER_VOLTAGE = 2 ; # [doc = "Over temperature failure."] const ESC_FAILURE_OVER_TEMPERATURE = 4 ; # [doc = "Over RPM failure."] const ESC_FAILURE_OVER_RPM = 8 ; # [doc = "Inconsistent command failure i.e. out of bounds."] const ESC_FAILURE_INCONSISTENT_CMD = 16 ; # [doc = "Motor stuck failure."] const ESC_FAILURE_MOTOR_STUCK = 32 ; # [doc = "Generic ESC failure."] const ESC_FAILURE_GENERIC = 64 ; } }
757impl EscFailureFlags {
758    pub const DEFAULT: Self = Self::ESC_FAILURE_OVER_CURRENT;
759}
760impl Default for EscFailureFlags {
761    fn default() -> Self {
762        Self::DEFAULT
763    }
764}
765bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in ESTIMATOR_STATUS message"] pub struct EstimatorStatusFlags : u16 { # [doc = "True if the attitude estimate is good"] const ESTIMATOR_ATTITUDE = 1 ; # [doc = "True if the horizontal velocity estimate is good"] const ESTIMATOR_VELOCITY_HORIZ = 2 ; # [doc = "True if the  vertical velocity estimate is good"] const ESTIMATOR_VELOCITY_VERT = 4 ; # [doc = "True if the horizontal position (relative) estimate is good"] const ESTIMATOR_POS_HORIZ_REL = 8 ; # [doc = "True if the horizontal position (absolute) estimate is good"] const ESTIMATOR_POS_HORIZ_ABS = 16 ; # [doc = "True if the vertical position (absolute) estimate is good"] const ESTIMATOR_POS_VERT_ABS = 32 ; # [doc = "True if the vertical position (above ground) estimate is good"] const ESTIMATOR_POS_VERT_AGL = 64 ; # [doc = "True if the EKF is in a constant position mode and is not using external measurements (eg GPS or optical flow)"] const ESTIMATOR_CONST_POS_MODE = 128 ; # [doc = "True if the EKF has sufficient data to enter a mode that will provide a (relative) position estimate"] const ESTIMATOR_PRED_POS_HORIZ_REL = 256 ; # [doc = "True if the EKF has sufficient data to enter a mode that will provide a (absolute) position estimate"] const ESTIMATOR_PRED_POS_HORIZ_ABS = 512 ; # [doc = "True if the EKF has detected a GPS glitch"] const ESTIMATOR_GPS_GLITCH = 1024 ; # [doc = "True if the EKF has detected bad accelerometer data"] const ESTIMATOR_ACCEL_ERROR = 2048 ; } }
766impl EstimatorStatusFlags {
767    pub const DEFAULT: Self = Self::ESTIMATOR_ATTITUDE;
768}
769impl Default for EstimatorStatusFlags {
770    fn default() -> Self {
771        Self::DEFAULT
772    }
773}
774#[cfg_attr(feature = "ts", derive(TS))]
775#[cfg_attr(feature = "ts", ts(export))]
776#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
777#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
778#[cfg_attr(feature = "serde", serde(tag = "type"))]
779#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
780#[repr(u32)]
781#[doc = "List of possible failure type to inject."]
782pub enum FailureType {
783    #[doc = "No failure injected, used to reset a previous failure."]
784    FAILURE_TYPE_OK = 0,
785    #[doc = "Sets unit off, so completely non-responsive."]
786    FAILURE_TYPE_OFF = 1,
787    #[doc = "Unit is stuck e.g. keeps reporting the same value."]
788    FAILURE_TYPE_STUCK = 2,
789    #[doc = "Unit is reporting complete garbage."]
790    FAILURE_TYPE_GARBAGE = 3,
791    #[doc = "Unit is consistently wrong."]
792    FAILURE_TYPE_WRONG = 4,
793    #[doc = "Unit is slow, so e.g. reporting at slower than expected rate."]
794    FAILURE_TYPE_SLOW = 5,
795    #[doc = "Data of unit is delayed in time."]
796    FAILURE_TYPE_DELAYED = 6,
797    #[doc = "Unit is sometimes working, sometimes not."]
798    FAILURE_TYPE_INTERMITTENT = 7,
799}
800impl FailureType {
801    pub const DEFAULT: Self = Self::FAILURE_TYPE_OK;
802}
803impl Default for FailureType {
804    fn default() -> Self {
805        Self::DEFAULT
806    }
807}
808#[cfg_attr(feature = "ts", derive(TS))]
809#[cfg_attr(feature = "ts", ts(export))]
810#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
811#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
812#[cfg_attr(feature = "serde", serde(tag = "type"))]
813#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
814#[repr(u32)]
815#[doc = "List of possible units where failures can be injected."]
816pub enum FailureUnit {
817    FAILURE_UNIT_SENSOR_GYRO = 0,
818    FAILURE_UNIT_SENSOR_ACCEL = 1,
819    FAILURE_UNIT_SENSOR_MAG = 2,
820    FAILURE_UNIT_SENSOR_BARO = 3,
821    FAILURE_UNIT_SENSOR_GPS = 4,
822    FAILURE_UNIT_SENSOR_OPTICAL_FLOW = 5,
823    FAILURE_UNIT_SENSOR_VIO = 6,
824    FAILURE_UNIT_SENSOR_DISTANCE_SENSOR = 7,
825    FAILURE_UNIT_SENSOR_AIRSPEED = 8,
826    FAILURE_UNIT_SYSTEM_BATTERY = 100,
827    FAILURE_UNIT_SYSTEM_MOTOR = 101,
828    FAILURE_UNIT_SYSTEM_SERVO = 102,
829    FAILURE_UNIT_SYSTEM_AVOIDANCE = 103,
830    FAILURE_UNIT_SYSTEM_RC_SIGNAL = 104,
831    FAILURE_UNIT_SYSTEM_MAVLINK_SIGNAL = 105,
832}
833impl FailureUnit {
834    pub const DEFAULT: Self = Self::FAILURE_UNIT_SENSOR_GYRO;
835}
836impl Default for FailureUnit {
837    fn default() -> Self {
838        Self::DEFAULT
839    }
840}
841#[cfg_attr(feature = "ts", derive(TS))]
842#[cfg_attr(feature = "ts", ts(export))]
843#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
844#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
845#[cfg_attr(feature = "serde", serde(tag = "type"))]
846#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
847#[repr(u32)]
848pub enum FenceBreach {
849    #[doc = "No last fence breach"]
850    FENCE_BREACH_NONE = 0,
851    #[doc = "Breached minimum altitude"]
852    FENCE_BREACH_MINALT = 1,
853    #[doc = "Breached maximum altitude"]
854    FENCE_BREACH_MAXALT = 2,
855    #[doc = "Breached fence boundary"]
856    FENCE_BREACH_BOUNDARY = 3,
857}
858impl FenceBreach {
859    pub const DEFAULT: Self = Self::FENCE_BREACH_NONE;
860}
861impl Default for FenceBreach {
862    fn default() -> Self {
863        Self::DEFAULT
864    }
865}
866#[cfg_attr(feature = "ts", derive(TS))]
867#[cfg_attr(feature = "ts", ts(export))]
868#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
869#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
870#[cfg_attr(feature = "serde", serde(tag = "type"))]
871#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
872#[repr(u32)]
873#[doc = "Actions being taken to mitigate/prevent fence breach"]
874pub enum FenceMitigate {
875    #[doc = "Unknown"]
876    FENCE_MITIGATE_UNKNOWN = 0,
877    #[doc = "No actions being taken"]
878    FENCE_MITIGATE_NONE = 1,
879    #[doc = "Velocity limiting active to prevent breach"]
880    FENCE_MITIGATE_VEL_LIMIT = 2,
881}
882impl FenceMitigate {
883    pub const DEFAULT: Self = Self::FENCE_MITIGATE_UNKNOWN;
884}
885impl Default for FenceMitigate {
886    fn default() -> Self {
887        Self::DEFAULT
888    }
889}
890#[cfg_attr(feature = "ts", derive(TS))]
891#[cfg_attr(feature = "ts", ts(export))]
892#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
893#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
894#[cfg_attr(feature = "serde", serde(tag = "type"))]
895#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
896#[repr(u32)]
897#[doc = "Fence types to enable or disable when using MAV_CMD_DO_FENCE_ENABLE.         Note that at least one of these flags must be set in MAV_CMD_DO_FENCE_ENABLE.param2.         If none are set, the flight stack will ignore the field and enable/disable its default set of fences (usually all of them)."]
898pub enum FenceType {
899    #[doc = "Maximum altitude fence"]
900    FENCE_TYPE_ALT_MAX = 1,
901    #[doc = "Circle fence"]
902    FENCE_TYPE_CIRCLE = 2,
903    #[doc = "Polygon fence"]
904    FENCE_TYPE_POLYGON = 4,
905    #[doc = "Minimum altitude fence"]
906    FENCE_TYPE_ALT_MIN = 8,
907}
908impl FenceType {
909    pub const DEFAULT: Self = Self::FENCE_TYPE_ALT_MAX;
910}
911impl Default for FenceType {
912    fn default() -> Self {
913        Self::DEFAULT
914    }
915}
916#[cfg_attr(feature = "ts", derive(TS))]
917#[cfg_attr(feature = "ts", ts(export))]
918#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
919#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
920#[cfg_attr(feature = "serde", serde(tag = "type"))]
921#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
922#[repr(u32)]
923#[doc = "These values define the type of firmware release.  These values indicate the first version or release of this type.  For example the first alpha release would be 64, the second would be 65."]
924pub enum FirmwareVersionType {
925    #[doc = "development release"]
926    FIRMWARE_VERSION_TYPE_DEV = 0,
927    #[doc = "alpha release"]
928    FIRMWARE_VERSION_TYPE_ALPHA = 64,
929    #[doc = "beta release"]
930    FIRMWARE_VERSION_TYPE_BETA = 128,
931    #[doc = "release candidate"]
932    FIRMWARE_VERSION_TYPE_RC = 192,
933    #[doc = "official stable release"]
934    FIRMWARE_VERSION_TYPE_OFFICIAL = 255,
935}
936impl FirmwareVersionType {
937    pub const DEFAULT: Self = Self::FIRMWARE_VERSION_TYPE_DEV;
938}
939impl Default for FirmwareVersionType {
940    fn default() -> Self {
941        Self::DEFAULT
942    }
943}
944bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal device (low level) capability flags (bitmap)."] pub struct GimbalDeviceCapFlags : u16 { # [doc = "Gimbal device supports a retracted position."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT = 1 ; # [doc = "Gimbal device supports a horizontal, forward looking position, stabilized."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_NEUTRAL = 2 ; # [doc = "Gimbal device supports rotating around roll axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_AXIS = 4 ; # [doc = "Gimbal device supports to follow a roll angle relative to the vehicle."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_FOLLOW = 8 ; # [doc = "Gimbal device supports locking to a roll angle (generally that's the default with roll stabilized)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_LOCK = 16 ; # [doc = "Gimbal device supports rotating around pitch axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_AXIS = 32 ; # [doc = "Gimbal device supports to follow a pitch angle relative to the vehicle."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_FOLLOW = 64 ; # [doc = "Gimbal device supports locking to a pitch angle (generally that's the default with pitch stabilized)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_LOCK = 128 ; # [doc = "Gimbal device supports rotating around yaw axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_AXIS = 256 ; # [doc = "Gimbal device supports to follow a yaw angle relative to the vehicle (generally that's the default)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_FOLLOW = 512 ; # [doc = "Gimbal device supports locking to an absolute heading, i.e., yaw angle relative to North (earth frame, often this is an option available)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_LOCK = 1024 ; # [doc = "Gimbal device supports yawing/panning infinitely (e.g. using slip disk)."] const GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_INFINITE_YAW = 2048 ; # [doc = "Gimbal device supports yaw angles and angular velocities relative to North (earth frame). This usually requires support by an autopilot via AUTOPILOT_STATE_FOR_GIMBAL_DEVICE. Support can go on and off during runtime, which is reported by the flag GIMBAL_DEVICE_FLAGS_CAN_ACCEPT_YAW_IN_EARTH_FRAME."] const GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME = 4096 ; # [doc = "Gimbal device supports radio control inputs as an alternative input for controlling the gimbal orientation."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_RC_INPUTS = 8192 ; } }
945impl GimbalDeviceCapFlags {
946    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT;
947}
948impl Default for GimbalDeviceCapFlags {
949    fn default() -> Self {
950        Self::DEFAULT
951    }
952}
953bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal device (low level) error flags (bitmap, 0 means no error)"] pub struct GimbalDeviceErrorFlags : u32 { # [doc = "Gimbal device is limited by hardware roll limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_ROLL_LIMIT = 1 ; # [doc = "Gimbal device is limited by hardware pitch limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_PITCH_LIMIT = 2 ; # [doc = "Gimbal device is limited by hardware yaw limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_YAW_LIMIT = 4 ; # [doc = "There is an error with the gimbal encoders."] const GIMBAL_DEVICE_ERROR_FLAGS_ENCODER_ERROR = 8 ; # [doc = "There is an error with the gimbal power source."] const GIMBAL_DEVICE_ERROR_FLAGS_POWER_ERROR = 16 ; # [doc = "There is an error with the gimbal motors."] const GIMBAL_DEVICE_ERROR_FLAGS_MOTOR_ERROR = 32 ; # [doc = "There is an error with the gimbal's software."] const GIMBAL_DEVICE_ERROR_FLAGS_SOFTWARE_ERROR = 64 ; # [doc = "There is an error with the gimbal's communication."] const GIMBAL_DEVICE_ERROR_FLAGS_COMMS_ERROR = 128 ; # [doc = "Gimbal device is currently calibrating."] const GIMBAL_DEVICE_ERROR_FLAGS_CALIBRATION_RUNNING = 256 ; # [doc = "Gimbal device is not assigned to a gimbal manager."] const GIMBAL_DEVICE_ERROR_FLAGS_NO_MANAGER = 512 ; } }
954impl GimbalDeviceErrorFlags {
955    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_ERROR_FLAGS_AT_ROLL_LIMIT;
956}
957impl Default for GimbalDeviceErrorFlags {
958    fn default() -> Self {
959        Self::DEFAULT
960    }
961}
962bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for gimbal device (lower level) operation."] pub struct GimbalDeviceFlags : u16 { # [doc = "Set to retracted safe position (no stabilization), takes precedence over all other flags."] const GIMBAL_DEVICE_FLAGS_RETRACT = 1 ; # [doc = "Set to neutral/default position, taking precedence over all other flags except RETRACT. Neutral is commonly forward-facing and horizontal (roll=pitch=yaw=0) but may be any orientation."] const GIMBAL_DEVICE_FLAGS_NEUTRAL = 2 ; # [doc = "Lock roll angle to absolute angle relative to horizon (not relative to vehicle). This is generally the default with a stabilizing gimbal."] const GIMBAL_DEVICE_FLAGS_ROLL_LOCK = 4 ; # [doc = "Lock pitch angle to absolute angle relative to horizon (not relative to vehicle). This is generally the default with a stabilizing gimbal."] const GIMBAL_DEVICE_FLAGS_PITCH_LOCK = 8 ; # [doc = "Lock yaw angle to absolute angle relative to North (not relative to vehicle). If this flag is set, the yaw angle and z component of angular velocity are relative to North (earth frame, x-axis pointing North), else they are relative to the vehicle heading (vehicle frame, earth frame rotated so that the x-axis is pointing forward)."] const GIMBAL_DEVICE_FLAGS_YAW_LOCK = 16 ; # [doc = "Yaw angle and z component of angular velocity are relative to the vehicle heading (vehicle frame, earth frame rotated such that the x-axis is pointing forward)."] const GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME = 32 ; # [doc = "Yaw angle and z component of angular velocity are relative to North (earth frame, x-axis is pointing North)."] const GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME = 64 ; # [doc = "Gimbal device can accept yaw angle inputs relative to North (earth frame). This flag is only for reporting (attempts to set this flag are ignored)."] const GIMBAL_DEVICE_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME = 128 ; # [doc = "The gimbal orientation is set exclusively by the RC signals feed to the gimbal's radio control inputs. MAVLink messages for setting the gimbal orientation (GIMBAL_DEVICE_SET_ATTITUDE) are ignored."] const GIMBAL_DEVICE_FLAGS_RC_EXCLUSIVE = 256 ; # [doc = "The gimbal orientation is determined by combining/mixing the RC signals feed to the gimbal's radio control inputs and the MAVLink messages for setting the gimbal orientation (GIMBAL_DEVICE_SET_ATTITUDE). How these two controls are combined or mixed is not defined by the protocol but is up to the implementation."] const GIMBAL_DEVICE_FLAGS_RC_MIXED = 512 ; } }
963impl GimbalDeviceFlags {
964    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_FLAGS_RETRACT;
965}
966impl Default for GimbalDeviceFlags {
967    fn default() -> Self {
968        Self::DEFAULT
969    }
970}
971bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal manager high level capability flags (bitmap). The first 16 bits are identical to the GIMBAL_DEVICE_CAP_FLAGS. However, the gimbal manager does not need to copy the flags from the gimbal but can also enhance the capabilities and thus add flags."] pub struct GimbalManagerCapFlags : u32 { # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_RETRACT = 1 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_NEUTRAL."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_NEUTRAL = 2 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_AXIS = 4 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_FOLLOW = 8 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_LOCK = 16 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_AXIS = 32 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_FOLLOW = 64 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_LOCK = 128 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_AXIS = 256 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_FOLLOW = 512 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_LOCK = 1024 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_INFINITE_YAW."] const GIMBAL_MANAGER_CAP_FLAGS_SUPPORTS_INFINITE_YAW = 2048 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME = 4096 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_RC_INPUTS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_RC_INPUTS = 8192 ; # [doc = "Gimbal manager supports to point to a local position."] const GIMBAL_MANAGER_CAP_FLAGS_CAN_POINT_LOCATION_LOCAL = 65536 ; # [doc = "Gimbal manager supports to point to a global latitude, longitude, altitude position."] const GIMBAL_MANAGER_CAP_FLAGS_CAN_POINT_LOCATION_GLOBAL = 131072 ; } }
972impl GimbalManagerCapFlags {
973    pub const DEFAULT: Self = Self::GIMBAL_MANAGER_CAP_FLAGS_HAS_RETRACT;
974}
975impl Default for GimbalManagerCapFlags {
976    fn default() -> Self {
977        Self::DEFAULT
978    }
979}
980bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for high level gimbal manager operation The first 16 bits are identical to the GIMBAL_DEVICE_FLAGS."] pub struct GimbalManagerFlags : u32 { # [doc = "Based on GIMBAL_DEVICE_FLAGS_RETRACT."] const GIMBAL_MANAGER_FLAGS_RETRACT = 1 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_NEUTRAL."] const GIMBAL_MANAGER_FLAGS_NEUTRAL = 2 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_ROLL_LOCK."] const GIMBAL_MANAGER_FLAGS_ROLL_LOCK = 4 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_PITCH_LOCK."] const GIMBAL_MANAGER_FLAGS_PITCH_LOCK = 8 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_LOCK."] const GIMBAL_MANAGER_FLAGS_YAW_LOCK = 16 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME."] const GIMBAL_MANAGER_FLAGS_YAW_IN_VEHICLE_FRAME = 32 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_FLAGS_YAW_IN_EARTH_FRAME = 64 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME = 128 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_RC_EXCLUSIVE."] const GIMBAL_MANAGER_FLAGS_RC_EXCLUSIVE = 256 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_RC_MIXED."] const GIMBAL_MANAGER_FLAGS_RC_MIXED = 512 ; } }
981impl GimbalManagerFlags {
982    pub const DEFAULT: Self = Self::GIMBAL_MANAGER_FLAGS_RETRACT;
983}
984impl Default for GimbalManagerFlags {
985    fn default() -> Self {
986        Self::DEFAULT
987    }
988}
989#[cfg_attr(feature = "ts", derive(TS))]
990#[cfg_attr(feature = "ts", ts(export))]
991#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
992#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
993#[cfg_attr(feature = "serde", serde(tag = "type"))]
994#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
995#[repr(u32)]
996#[doc = "Type of GPS fix"]
997pub enum GpsFixType {
998    #[doc = "No GPS connected"]
999    GPS_FIX_TYPE_NO_GPS = 0,
1000    #[doc = "No position information, GPS is connected"]
1001    GPS_FIX_TYPE_NO_FIX = 1,
1002    #[doc = "2D position"]
1003    GPS_FIX_TYPE_2D_FIX = 2,
1004    #[doc = "3D position"]
1005    GPS_FIX_TYPE_3D_FIX = 3,
1006    #[doc = "DGPS/SBAS aided 3D position"]
1007    GPS_FIX_TYPE_DGPS = 4,
1008    #[doc = "RTK float, 3D position"]
1009    GPS_FIX_TYPE_RTK_FLOAT = 5,
1010    #[doc = "RTK Fixed, 3D position"]
1011    GPS_FIX_TYPE_RTK_FIXED = 6,
1012    #[doc = "Static fixed, typically used for base stations"]
1013    GPS_FIX_TYPE_STATIC = 7,
1014    #[doc = "PPP, 3D position."]
1015    GPS_FIX_TYPE_PPP = 8,
1016}
1017impl GpsFixType {
1018    pub const DEFAULT: Self = Self::GPS_FIX_TYPE_NO_GPS;
1019}
1020impl Default for GpsFixType {
1021    fn default() -> Self {
1022        Self::DEFAULT
1023    }
1024}
1025bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] pub struct GpsInputIgnoreFlags : u16 { # [doc = "ignore altitude field"] const GPS_INPUT_IGNORE_FLAG_ALT = 1 ; # [doc = "ignore hdop field"] const GPS_INPUT_IGNORE_FLAG_HDOP = 2 ; # [doc = "ignore vdop field"] const GPS_INPUT_IGNORE_FLAG_VDOP = 4 ; # [doc = "ignore horizontal velocity field (vn and ve)"] const GPS_INPUT_IGNORE_FLAG_VEL_HORIZ = 8 ; # [doc = "ignore vertical velocity field (vd)"] const GPS_INPUT_IGNORE_FLAG_VEL_VERT = 16 ; # [doc = "ignore speed accuracy field"] const GPS_INPUT_IGNORE_FLAG_SPEED_ACCURACY = 32 ; # [doc = "ignore horizontal accuracy field"] const GPS_INPUT_IGNORE_FLAG_HORIZONTAL_ACCURACY = 64 ; # [doc = "ignore vertical accuracy field"] const GPS_INPUT_IGNORE_FLAG_VERTICAL_ACCURACY = 128 ; } }
1026impl GpsInputIgnoreFlags {
1027    pub const DEFAULT: Self = Self::GPS_INPUT_IGNORE_FLAG_ALT;
1028}
1029impl Default for GpsInputIgnoreFlags {
1030    fn default() -> Self {
1031        Self::DEFAULT
1032    }
1033}
1034#[cfg_attr(feature = "ts", derive(TS))]
1035#[cfg_attr(feature = "ts", ts(export))]
1036#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1037#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1038#[cfg_attr(feature = "serde", serde(tag = "type"))]
1039#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1040#[repr(u32)]
1041#[doc = "Gripper actions."]
1042pub enum GripperActions {
1043    #[doc = "Gripper release cargo."]
1044    GRIPPER_ACTION_RELEASE = 0,
1045    #[doc = "Gripper grab onto cargo."]
1046    GRIPPER_ACTION_GRAB = 1,
1047}
1048impl GripperActions {
1049    pub const DEFAULT: Self = Self::GRIPPER_ACTION_RELEASE;
1050}
1051impl Default for GripperActions {
1052    fn default() -> Self {
1053        Self::DEFAULT
1054    }
1055}
1056#[cfg_attr(feature = "ts", derive(TS))]
1057#[cfg_attr(feature = "ts", ts(export))]
1058#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1059#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1060#[cfg_attr(feature = "serde", serde(tag = "type"))]
1061#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1062#[repr(u32)]
1063pub enum GsmLinkType {
1064    #[doc = "no service"]
1065    GSM_LINK_TYPE_NONE = 0,
1066    #[doc = "link type unknown"]
1067    GSM_LINK_TYPE_UNKNOWN = 1,
1068    #[doc = "2G (GSM/GRPS/EDGE) link"]
1069    GSM_LINK_TYPE_2G = 2,
1070    #[doc = "3G link (WCDMA/HSDPA/HSPA)"]
1071    GSM_LINK_TYPE_3G = 3,
1072    #[doc = "4G link (LTE)"]
1073    GSM_LINK_TYPE_4G = 4,
1074}
1075impl GsmLinkType {
1076    pub const DEFAULT: Self = Self::GSM_LINK_TYPE_NONE;
1077}
1078impl Default for GsmLinkType {
1079    fn default() -> Self {
1080        Self::DEFAULT
1081    }
1082}
1083#[cfg_attr(feature = "ts", derive(TS))]
1084#[cfg_attr(feature = "ts", ts(export))]
1085#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1086#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1087#[cfg_attr(feature = "serde", serde(tag = "type"))]
1088#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1089#[repr(u32)]
1090pub enum GsmModemType {
1091    #[doc = "not specified"]
1092    GSM_MODEM_TYPE_UNKNOWN = 0,
1093    #[doc = "HUAWEI LTE USB Stick E3372"]
1094    GSM_MODEM_TYPE_HUAWEI_E3372 = 1,
1095}
1096impl GsmModemType {
1097    pub const DEFAULT: Self = Self::GSM_MODEM_TYPE_UNKNOWN;
1098}
1099impl Default for GsmModemType {
1100    fn default() -> Self {
1101        Self::DEFAULT
1102    }
1103}
1104bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in the HIGHRES_IMU message indicate which fields have updated since the last message"] pub struct HighresImuUpdatedFlags : u16 { # [doc = "The value in the xacc field has been updated"] const HIGHRES_IMU_UPDATED_XACC = 1 ; # [doc = "The value in the yacc field has been updated"] const HIGHRES_IMU_UPDATED_YACC = 2 ; # [doc = "The value in the zacc field has been updated since"] const HIGHRES_IMU_UPDATED_ZACC = 4 ; # [doc = "The value in the xgyro field has been updated"] const HIGHRES_IMU_UPDATED_XGYRO = 8 ; # [doc = "The value in the ygyro field has been updated"] const HIGHRES_IMU_UPDATED_YGYRO = 16 ; # [doc = "The value in the zgyro field has been updated"] const HIGHRES_IMU_UPDATED_ZGYRO = 32 ; # [doc = "The value in the xmag field has been updated"] const HIGHRES_IMU_UPDATED_XMAG = 64 ; # [doc = "The value in the ymag field has been updated"] const HIGHRES_IMU_UPDATED_YMAG = 128 ; # [doc = "The value in the zmag field has been updated"] const HIGHRES_IMU_UPDATED_ZMAG = 256 ; # [doc = "The value in the abs_pressure field has been updated"] const HIGHRES_IMU_UPDATED_ABS_PRESSURE = 512 ; # [doc = "The value in the diff_pressure field has been updated"] const HIGHRES_IMU_UPDATED_DIFF_PRESSURE = 1024 ; # [doc = "The value in the pressure_alt field has been updated"] const HIGHRES_IMU_UPDATED_PRESSURE_ALT = 2048 ; # [doc = "The value in the temperature field has been updated"] const HIGHRES_IMU_UPDATED_TEMPERATURE = 4096 ; } }
1105impl HighresImuUpdatedFlags {
1106    pub const DEFAULT: Self = Self::HIGHRES_IMU_UPDATED_XACC;
1107}
1108impl Default for HighresImuUpdatedFlags {
1109    fn default() -> Self {
1110        Self::DEFAULT
1111    }
1112}
1113bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags used in HIL_ACTUATOR_CONTROLS message."] pub struct HilActuatorControlsFlags : u64 { # [doc = "Simulation is using lockstep"] const HIL_ACTUATOR_CONTROLS_FLAGS_LOCKSTEP = 1 ; } }
1114impl HilActuatorControlsFlags {
1115    pub const DEFAULT: Self = Self::HIL_ACTUATOR_CONTROLS_FLAGS_LOCKSTEP;
1116}
1117impl Default for HilActuatorControlsFlags {
1118    fn default() -> Self {
1119        Self::DEFAULT
1120    }
1121}
1122bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in the HIL_SENSOR message indicate which fields have updated since the last message"] pub struct HilSensorUpdatedFlags : u32 { # [doc = "The value in the xacc field has been updated"] const HIL_SENSOR_UPDATED_XACC = 1 ; # [doc = "The value in the yacc field has been updated"] const HIL_SENSOR_UPDATED_YACC = 2 ; # [doc = "The value in the zacc field has been updated"] const HIL_SENSOR_UPDATED_ZACC = 4 ; # [doc = "The value in the xgyro field has been updated"] const HIL_SENSOR_UPDATED_XGYRO = 8 ; # [doc = "The value in the ygyro field has been updated"] const HIL_SENSOR_UPDATED_YGYRO = 16 ; # [doc = "The value in the zgyro field has been updated"] const HIL_SENSOR_UPDATED_ZGYRO = 32 ; # [doc = "The value in the xmag field has been updated"] const HIL_SENSOR_UPDATED_XMAG = 64 ; # [doc = "The value in the ymag field has been updated"] const HIL_SENSOR_UPDATED_YMAG = 128 ; # [doc = "The value in the zmag field has been updated"] const HIL_SENSOR_UPDATED_ZMAG = 256 ; # [doc = "The value in the abs_pressure field has been updated"] const HIL_SENSOR_UPDATED_ABS_PRESSURE = 512 ; # [doc = "The value in the diff_pressure field has been updated"] const HIL_SENSOR_UPDATED_DIFF_PRESSURE = 1024 ; # [doc = "The value in the pressure_alt field has been updated"] const HIL_SENSOR_UPDATED_PRESSURE_ALT = 2048 ; # [doc = "The value in the temperature field has been updated"] const HIL_SENSOR_UPDATED_TEMPERATURE = 4096 ; # [doc = "Full reset of attitude/position/velocities/etc was performed in sim (Bit 31)."] const HIL_SENSOR_UPDATED_RESET = 2147483648 ; } }
1123impl HilSensorUpdatedFlags {
1124    pub const DEFAULT: Self = Self::HIL_SENSOR_UPDATED_XACC;
1125}
1126impl Default for HilSensorUpdatedFlags {
1127    fn default() -> Self {
1128        Self::DEFAULT
1129    }
1130}
1131bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report failure cases over the high latency telemetry."] pub struct HlFailureFlag : u16 { # [doc = "GPS failure."] const HL_FAILURE_FLAG_GPS = 1 ; # [doc = "Differential pressure sensor failure."] const HL_FAILURE_FLAG_DIFFERENTIAL_PRESSURE = 2 ; # [doc = "Absolute pressure sensor failure."] const HL_FAILURE_FLAG_ABSOLUTE_PRESSURE = 4 ; # [doc = "Accelerometer sensor failure."] const HL_FAILURE_FLAG_3D_ACCEL = 8 ; # [doc = "Gyroscope sensor failure."] const HL_FAILURE_FLAG_3D_GYRO = 16 ; # [doc = "Magnetometer sensor failure."] const HL_FAILURE_FLAG_3D_MAG = 32 ; # [doc = "Terrain subsystem failure."] const HL_FAILURE_FLAG_TERRAIN = 64 ; # [doc = "Battery failure/critical low battery."] const HL_FAILURE_FLAG_BATTERY = 128 ; # [doc = "RC receiver failure/no RC connection."] const HL_FAILURE_FLAG_RC_RECEIVER = 256 ; # [doc = "Offboard link failure."] const HL_FAILURE_FLAG_OFFBOARD_LINK = 512 ; # [doc = "Engine failure."] const HL_FAILURE_FLAG_ENGINE = 1024 ; # [doc = "Geofence violation."] const HL_FAILURE_FLAG_GEOFENCE = 2048 ; # [doc = "Estimator failure, for example measurement rejection or large variances."] const HL_FAILURE_FLAG_ESTIMATOR = 4096 ; # [doc = "Mission failure."] const HL_FAILURE_FLAG_MISSION = 8192 ; } }
1132impl HlFailureFlag {
1133    pub const DEFAULT: Self = Self::HL_FAILURE_FLAG_GPS;
1134}
1135impl Default for HlFailureFlag {
1136    fn default() -> Self {
1137        Self::DEFAULT
1138    }
1139}
1140bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Illuminator module error flags (bitmap, 0 means no error)"] pub struct IlluminatorErrorFlags : u32 { # [doc = "Illuminator thermal throttling error."] const ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING = 1 ; # [doc = "Illuminator over temperature shutdown error."] const ILLUMINATOR_ERROR_FLAGS_OVER_TEMPERATURE_SHUTDOWN = 2 ; # [doc = "Illuminator thermistor failure."] const ILLUMINATOR_ERROR_FLAGS_THERMISTOR_FAILURE = 4 ; } }
1141impl IlluminatorErrorFlags {
1142    pub const DEFAULT: Self = Self::ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING;
1143}
1144impl Default for IlluminatorErrorFlags {
1145    fn default() -> Self {
1146        Self::DEFAULT
1147    }
1148}
1149#[cfg_attr(feature = "ts", derive(TS))]
1150#[cfg_attr(feature = "ts", ts(export))]
1151#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1152#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1153#[cfg_attr(feature = "serde", serde(tag = "type"))]
1154#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1155#[repr(u32)]
1156#[doc = "Modes of illuminator"]
1157pub enum IlluminatorMode {
1158    #[doc = "Illuminator mode is not specified/unknown"]
1159    ILLUMINATOR_MODE_UNKNOWN = 0,
1160    #[doc = "Illuminator behavior is controlled by MAV_CMD_DO_ILLUMINATOR_CONFIGURE settings"]
1161    ILLUMINATOR_MODE_INTERNAL_CONTROL = 1,
1162    #[doc = "Illuminator behavior is controlled by external factors: e.g. an external hardware signal"]
1163    ILLUMINATOR_MODE_EXTERNAL_SYNC = 2,
1164}
1165impl IlluminatorMode {
1166    pub const DEFAULT: Self = Self::ILLUMINATOR_MODE_UNKNOWN;
1167}
1168impl Default for IlluminatorMode {
1169    fn default() -> Self {
1170        Self::DEFAULT
1171    }
1172}
1173#[cfg_attr(feature = "ts", derive(TS))]
1174#[cfg_attr(feature = "ts", ts(export))]
1175#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1176#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1177#[cfg_attr(feature = "serde", serde(tag = "type"))]
1178#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1179#[repr(u32)]
1180#[doc = "Type of landing target"]
1181pub enum LandingTargetType {
1182    #[doc = "Landing target signaled by light beacon (ex: IR-LOCK)"]
1183    LANDING_TARGET_TYPE_LIGHT_BEACON = 0,
1184    #[doc = "Landing target signaled by radio beacon (ex: ILS, NDB)"]
1185    LANDING_TARGET_TYPE_RADIO_BEACON = 1,
1186    #[doc = "Landing target represented by a fiducial marker (ex: ARTag)"]
1187    LANDING_TARGET_TYPE_VISION_FIDUCIAL = 2,
1188    #[doc = "Landing target represented by a pre-defined visual shape/feature (ex: X-marker, H-marker, square)"]
1189    LANDING_TARGET_TYPE_VISION_OTHER = 3,
1190}
1191impl LandingTargetType {
1192    pub const DEFAULT: Self = Self::LANDING_TARGET_TYPE_LIGHT_BEACON;
1193}
1194impl Default for LandingTargetType {
1195    fn default() -> Self {
1196        Self::DEFAULT
1197    }
1198}
1199#[cfg_attr(feature = "ts", derive(TS))]
1200#[cfg_attr(feature = "ts", ts(export))]
1201#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1202#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1203#[cfg_attr(feature = "serde", serde(tag = "type"))]
1204#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1205#[repr(u32)]
1206pub enum MagCalStatus {
1207    MAG_CAL_NOT_STARTED = 0,
1208    MAG_CAL_WAITING_TO_START = 1,
1209    MAG_CAL_RUNNING_STEP_ONE = 2,
1210    MAG_CAL_RUNNING_STEP_TWO = 3,
1211    MAG_CAL_SUCCESS = 4,
1212    MAG_CAL_FAILED = 5,
1213    MAG_CAL_BAD_ORIENTATION = 6,
1214    MAG_CAL_BAD_RADIUS = 7,
1215}
1216impl MagCalStatus {
1217    pub const DEFAULT: Self = Self::MAG_CAL_NOT_STARTED;
1218}
1219impl Default for MagCalStatus {
1220    fn default() -> Self {
1221        Self::DEFAULT
1222    }
1223}
1224#[cfg_attr(feature = "ts", derive(TS))]
1225#[cfg_attr(feature = "ts", ts(export))]
1226#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1227#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1228#[cfg_attr(feature = "serde", serde(tag = "type"))]
1229#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1230#[repr(u32)]
1231pub enum MavArmAuthDeniedReason {
1232    #[doc = "Not a specific reason"]
1233    MAV_ARM_AUTH_DENIED_REASON_GENERIC = 0,
1234    #[doc = "Authorizer will send the error as string to GCS"]
1235    MAV_ARM_AUTH_DENIED_REASON_NONE = 1,
1236    #[doc = "At least one waypoint have a invalid value"]
1237    MAV_ARM_AUTH_DENIED_REASON_INVALID_WAYPOINT = 2,
1238    #[doc = "Timeout in the authorizer process(in case it depends on network)"]
1239    MAV_ARM_AUTH_DENIED_REASON_TIMEOUT = 3,
1240    #[doc = "Airspace of the mission in use by another vehicle, second result parameter can have the waypoint id that caused it to be denied."]
1241    MAV_ARM_AUTH_DENIED_REASON_AIRSPACE_IN_USE = 4,
1242    #[doc = "Weather is not good to fly"]
1243    MAV_ARM_AUTH_DENIED_REASON_BAD_WEATHER = 5,
1244}
1245impl MavArmAuthDeniedReason {
1246    pub const DEFAULT: Self = Self::MAV_ARM_AUTH_DENIED_REASON_GENERIC;
1247}
1248impl Default for MavArmAuthDeniedReason {
1249    fn default() -> Self {
1250        Self::DEFAULT
1251    }
1252}
1253#[cfg_attr(feature = "ts", derive(TS))]
1254#[cfg_attr(feature = "ts", ts(export))]
1255#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1256#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1257#[cfg_attr(feature = "serde", serde(tag = "type"))]
1258#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1259#[repr(u32)]
1260#[doc = "Micro air vehicle / autopilot classes. This identifies the individual model."]
1261pub enum MavAutopilot {
1262    #[doc = "Generic autopilot, full support for everything"]
1263    MAV_AUTOPILOT_GENERIC = 0,
1264    #[doc = "Reserved for future use."]
1265    MAV_AUTOPILOT_RESERVED = 1,
1266    #[doc = "SLUGS autopilot, <http://slugsuav.soe.ucsc.edu>"]
1267    MAV_AUTOPILOT_SLUGS = 2,
1268    #[doc = "ArduPilot - Plane/Copter/Rover/Sub/Tracker, <https://ardupilot.org>"]
1269    MAV_AUTOPILOT_ARDUPILOTMEGA = 3,
1270    #[doc = "OpenPilot, <http://openpilot.org>"]
1271    MAV_AUTOPILOT_OPENPILOT = 4,
1272    #[doc = "Generic autopilot only supporting simple waypoints"]
1273    MAV_AUTOPILOT_GENERIC_WAYPOINTS_ONLY = 5,
1274    #[doc = "Generic autopilot supporting waypoints and other simple navigation commands"]
1275    MAV_AUTOPILOT_GENERIC_WAYPOINTS_AND_SIMPLE_NAVIGATION_ONLY = 6,
1276    #[doc = "Generic autopilot supporting the full mission command set"]
1277    MAV_AUTOPILOT_GENERIC_MISSION_FULL = 7,
1278    #[doc = "No valid autopilot, e.g. a GCS or other MAVLink component"]
1279    MAV_AUTOPILOT_INVALID = 8,
1280    #[doc = "PPZ UAV - <http://nongnu.org/paparazzi>"]
1281    MAV_AUTOPILOT_PPZ = 9,
1282    #[doc = "UAV Dev Board"]
1283    MAV_AUTOPILOT_UDB = 10,
1284    #[doc = "FlexiPilot"]
1285    MAV_AUTOPILOT_FP = 11,
1286    #[doc = "PX4 Autopilot - <http://px4.io/>"]
1287    MAV_AUTOPILOT_PX4 = 12,
1288    #[doc = "SMACCMPilot - <http://smaccmpilot.org>"]
1289    MAV_AUTOPILOT_SMACCMPILOT = 13,
1290    #[doc = "AutoQuad -- <http://autoquad.org>"]
1291    MAV_AUTOPILOT_AUTOQUAD = 14,
1292    #[doc = "Armazila -- <http://armazila.com>"]
1293    MAV_AUTOPILOT_ARMAZILA = 15,
1294    #[doc = "Aerob -- <http://aerob.ru>"]
1295    MAV_AUTOPILOT_AEROB = 16,
1296    #[doc = "ASLUAV autopilot -- <http://www.asl.ethz.ch>"]
1297    MAV_AUTOPILOT_ASLUAV = 17,
1298    #[doc = "SmartAP Autopilot - <http://sky-drones.com>"]
1299    MAV_AUTOPILOT_SMARTAP = 18,
1300    #[doc = "AirRails - <http://uaventure.com>"]
1301    MAV_AUTOPILOT_AIRRAILS = 19,
1302    #[doc = "Fusion Reflex - <https://fusion.engineering>"]
1303    MAV_AUTOPILOT_REFLEX = 20,
1304}
1305impl MavAutopilot {
1306    pub const DEFAULT: Self = Self::MAV_AUTOPILOT_GENERIC;
1307}
1308impl Default for MavAutopilot {
1309    fn default() -> Self {
1310        Self::DEFAULT
1311    }
1312}
1313#[cfg_attr(feature = "ts", derive(TS))]
1314#[cfg_attr(feature = "ts", ts(export))]
1315#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1316#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1317#[cfg_attr(feature = "serde", serde(tag = "type"))]
1318#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1319#[repr(u32)]
1320#[doc = "Enumeration for battery charge states."]
1321pub enum MavBatteryChargeState {
1322    #[doc = "Low battery state is not provided"]
1323    MAV_BATTERY_CHARGE_STATE_UNDEFINED = 0,
1324    #[doc = "Battery is not in low state. Normal operation."]
1325    MAV_BATTERY_CHARGE_STATE_OK = 1,
1326    #[doc = "Battery state is low, warn and monitor close."]
1327    MAV_BATTERY_CHARGE_STATE_LOW = 2,
1328    #[doc = "Battery state is critical, return or abort immediately."]
1329    MAV_BATTERY_CHARGE_STATE_CRITICAL = 3,
1330    #[doc = "Battery state is too low for ordinary abort sequence. Perform fastest possible emergency stop to prevent damage."]
1331    MAV_BATTERY_CHARGE_STATE_EMERGENCY = 4,
1332    #[doc = "Battery failed, damage unavoidable. Possible causes (faults) are listed in MAV_BATTERY_FAULT."]
1333    MAV_BATTERY_CHARGE_STATE_FAILED = 5,
1334    #[doc = "Battery is diagnosed to be defective or an error occurred, usage is discouraged / prohibited. Possible causes (faults) are listed in MAV_BATTERY_FAULT."]
1335    MAV_BATTERY_CHARGE_STATE_UNHEALTHY = 6,
1336    #[doc = "Battery is charging."]
1337    MAV_BATTERY_CHARGE_STATE_CHARGING = 7,
1338}
1339impl MavBatteryChargeState {
1340    pub const DEFAULT: Self = Self::MAV_BATTERY_CHARGE_STATE_UNDEFINED;
1341}
1342impl Default for MavBatteryChargeState {
1343    fn default() -> Self {
1344        Self::DEFAULT
1345    }
1346}
1347bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Smart battery supply status/fault flags (bitmask) for health indication. The battery must also report either MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY if any of these are set."] pub struct MavBatteryFault : u32 { # [doc = "Battery has deep discharged."] const MAV_BATTERY_FAULT_DEEP_DISCHARGE = 1 ; # [doc = "Voltage spikes."] const MAV_BATTERY_FAULT_SPIKES = 2 ; # [doc = "One or more cells have failed. Battery should also report MAV_BATTERY_CHARGE_STATE_FAILE (and should not be used)."] const MAV_BATTERY_FAULT_CELL_FAIL = 4 ; # [doc = "Over-current fault."] const MAV_BATTERY_FAULT_OVER_CURRENT = 8 ; # [doc = "Over-temperature fault."] const MAV_BATTERY_FAULT_OVER_TEMPERATURE = 16 ; # [doc = "Under-temperature fault."] const MAV_BATTERY_FAULT_UNDER_TEMPERATURE = 32 ; # [doc = "Vehicle voltage is not compatible with this battery (batteries on same power rail should have similar voltage)."] const MAV_BATTERY_FAULT_INCOMPATIBLE_VOLTAGE = 64 ; # [doc = "Battery firmware is not compatible with current autopilot firmware."] const MAV_BATTERY_FAULT_INCOMPATIBLE_FIRMWARE = 128 ; # [doc = "Battery is not compatible due to cell configuration (e.g. 5s1p when vehicle requires 6s)."] const BATTERY_FAULT_INCOMPATIBLE_CELLS_CONFIGURATION = 256 ; } }
1348impl MavBatteryFault {
1349    pub const DEFAULT: Self = Self::MAV_BATTERY_FAULT_DEEP_DISCHARGE;
1350}
1351impl Default for MavBatteryFault {
1352    fn default() -> Self {
1353        Self::DEFAULT
1354    }
1355}
1356#[cfg_attr(feature = "ts", derive(TS))]
1357#[cfg_attr(feature = "ts", ts(export))]
1358#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1359#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1360#[cfg_attr(feature = "serde", serde(tag = "type"))]
1361#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1362#[repr(u32)]
1363#[doc = "Enumeration of battery functions"]
1364pub enum MavBatteryFunction {
1365    #[doc = "Battery function is unknown"]
1366    MAV_BATTERY_FUNCTION_UNKNOWN = 0,
1367    #[doc = "Battery supports all flight systems"]
1368    MAV_BATTERY_FUNCTION_ALL = 1,
1369    #[doc = "Battery for the propulsion system"]
1370    MAV_BATTERY_FUNCTION_PROPULSION = 2,
1371    #[doc = "Avionics battery"]
1372    MAV_BATTERY_FUNCTION_AVIONICS = 3,
1373    #[doc = "Payload battery"]
1374    MAV_BATTERY_FUNCTION_PAYLOAD = 4,
1375}
1376impl MavBatteryFunction {
1377    pub const DEFAULT: Self = Self::MAV_BATTERY_FUNCTION_UNKNOWN;
1378}
1379impl Default for MavBatteryFunction {
1380    fn default() -> Self {
1381        Self::DEFAULT
1382    }
1383}
1384#[cfg_attr(feature = "ts", derive(TS))]
1385#[cfg_attr(feature = "ts", ts(export))]
1386#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1387#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1388#[cfg_attr(feature = "serde", serde(tag = "type"))]
1389#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1390#[repr(u32)]
1391#[doc = "Battery mode. Note, the normal operation mode (i.e. when flying) should be reported as MAV_BATTERY_MODE_UNKNOWN to allow message trimming in normal flight."]
1392pub enum MavBatteryMode {
1393    #[doc = "Battery mode not supported/unknown battery mode/normal operation."]
1394    MAV_BATTERY_MODE_UNKNOWN = 0,
1395    #[doc = "Battery is auto discharging (towards storage level)."]
1396    MAV_BATTERY_MODE_AUTO_DISCHARGING = 1,
1397    #[doc = "Battery in hot-swap mode (current limited to prevent spikes that might damage sensitive electrical circuits)."]
1398    MAV_BATTERY_MODE_HOT_SWAP = 2,
1399}
1400impl MavBatteryMode {
1401    pub const DEFAULT: Self = Self::MAV_BATTERY_MODE_UNKNOWN;
1402}
1403impl Default for MavBatteryMode {
1404    fn default() -> Self {
1405        Self::DEFAULT
1406    }
1407}
1408#[cfg_attr(feature = "ts", derive(TS))]
1409#[cfg_attr(feature = "ts", ts(export))]
1410#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1411#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1412#[cfg_attr(feature = "serde", serde(tag = "type"))]
1413#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1414#[repr(u32)]
1415#[doc = "Enumeration of battery types"]
1416pub enum MavBatteryType {
1417    #[doc = "Not specified."]
1418    MAV_BATTERY_TYPE_UNKNOWN = 0,
1419    #[doc = "Lithium polymer battery"]
1420    MAV_BATTERY_TYPE_LIPO = 1,
1421    #[doc = "Lithium-iron-phosphate battery"]
1422    MAV_BATTERY_TYPE_LIFE = 2,
1423    #[doc = "Lithium-ION battery"]
1424    MAV_BATTERY_TYPE_LION = 3,
1425    #[doc = "Nickel metal hydride battery"]
1426    MAV_BATTERY_TYPE_NIMH = 4,
1427}
1428impl MavBatteryType {
1429    pub const DEFAULT: Self = Self::MAV_BATTERY_TYPE_UNKNOWN;
1430}
1431impl Default for MavBatteryType {
1432    fn default() -> Self {
1433        Self::DEFAULT
1434    }
1435}
1436#[cfg_attr(feature = "ts", derive(TS))]
1437#[cfg_attr(feature = "ts", ts(export))]
1438#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1439#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1440#[cfg_attr(feature = "serde", serde(tag = "type"))]
1441#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1442#[repr(u32)]
1443#[doc = "Commands to be executed by the MAV. They can be executed on user request, or as part of a mission script. If the action is used in a mission, the parameter mapping to the waypoint/mission message is as follows: Param 1, Param 2, Param 3, Param 4, X: Param 5, Y:Param 6, Z:Param 7. This command list is similar what ARINC 424 is for commercial aircraft: A data format how to interpret waypoint/mission data. NaN and INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current yaw or latitude rather than a specific value). See <https://mavlink.io/en/guide/xml_schema.html#MAV_CMD> for information about the structure of the MAV_CMD entries"]
1444pub enum MavCmd {
1445    #[doc = "Navigate to waypoint. This is intended for use in missions (for guided commands outside of missions use MAV_CMD_DO_REPOSITION)."]
1446    MAV_CMD_NAV_WAYPOINT = 16,
1447    #[doc = "Loiter around this waypoint an unlimited amount of time"]
1448    MAV_CMD_NAV_LOITER_UNLIM = 17,
1449    #[doc = "Loiter around this waypoint for X turns"]
1450    MAV_CMD_NAV_LOITER_TURNS = 18,
1451    #[doc = "Loiter at the specified latitude, longitude and altitude for a certain amount of time. Multicopter vehicles stop at the point (within a vehicle-specific acceptance radius). Forward-only moving vehicles (e.g. fixed-wing) circle the point with the specified radius/direction. If the Heading Required parameter (2) is non-zero forward moving aircraft will only leave the loiter circle once heading towards the next waypoint."]
1452    MAV_CMD_NAV_LOITER_TIME = 19,
1453    #[doc = "Return to launch location"]
1454    MAV_CMD_NAV_RETURN_TO_LAUNCH = 20,
1455    #[doc = "Land at location."]
1456    MAV_CMD_NAV_LAND = 21,
1457    #[doc = "Takeoff from ground / hand. Vehicles that support multiple takeoff modes (e.g. VTOL quadplane) should take off using the currently configured mode."]
1458    MAV_CMD_NAV_TAKEOFF = 22,
1459    #[doc = "Land at local position (local frame only)"]
1460    MAV_CMD_NAV_LAND_LOCAL = 23,
1461    #[doc = "Takeoff from local position (local frame only)"]
1462    MAV_CMD_NAV_TAKEOFF_LOCAL = 24,
1463    #[doc = "Vehicle following, i.e. this waypoint represents the position of a moving vehicle"]
1464    MAV_CMD_NAV_FOLLOW = 25,
1465    #[doc = "Continue on the current course and climb/descend to specified altitude.  When the altitude is reached continue to the next command (i.e., don't proceed to the next command until the desired altitude is reached."]
1466    MAV_CMD_NAV_CONTINUE_AND_CHANGE_ALT = 30,
1467    #[doc = "Begin loiter at the specified Latitude and Longitude.  If Lat=Lon=0, then loiter at the current position.  Don't consider the navigation command complete (don't leave loiter) until the altitude has been reached. Additionally, if the Heading Required parameter is non-zero the aircraft will not leave the loiter until heading toward the next waypoint."]
1468    MAV_CMD_NAV_LOITER_TO_ALT = 31,
1469    #[doc = "Begin following a target"]
1470    MAV_CMD_DO_FOLLOW = 32,
1471    #[doc = "Reposition the MAV after a follow target command has been sent"]
1472    MAV_CMD_DO_FOLLOW_REPOSITION = 33,
1473    #[doc = "Start orbiting on the circumference of a circle defined by the parameters. Setting values to NaN/INT32_MAX (as appropriate) results in using defaults."]
1474    MAV_CMD_DO_ORBIT = 34,
1475    #[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
1476    #[doc = "Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras."]
1477    MAV_CMD_NAV_ROI = 80,
1478    #[doc = "Control autonomous path planning on the MAV."]
1479    MAV_CMD_NAV_PATHPLANNING = 81,
1480    #[doc = "Navigate to waypoint using a spline path."]
1481    MAV_CMD_NAV_SPLINE_WAYPOINT = 82,
1482    #[doc = "Takeoff from ground using VTOL mode, and transition to forward flight with specified heading. The command should be ignored by vehicles that dont support both VTOL and fixed-wing flight (multicopters, boats,etc.)."]
1483    MAV_CMD_NAV_VTOL_TAKEOFF = 84,
1484    #[doc = "Land using VTOL mode"]
1485    MAV_CMD_NAV_VTOL_LAND = 85,
1486    #[doc = "hand control over to an external controller"]
1487    MAV_CMD_NAV_GUIDED_ENABLE = 92,
1488    #[doc = "Delay the next navigation command a number of seconds or until a specified time"]
1489    MAV_CMD_NAV_DELAY = 93,
1490    #[doc = "Descend and place payload. Vehicle moves to specified location, descends until it detects a hanging payload has reached the ground, and then releases the payload. If ground is not detected before the reaching the maximum descent value (param1), the command will complete without releasing the payload."]
1491    MAV_CMD_NAV_PAYLOAD_PLACE = 94,
1492    #[doc = "NOP - This command is only used to mark the upper limit of the NAV/ACTION commands in the enumeration"]
1493    MAV_CMD_NAV_LAST = 95,
1494    #[doc = "Delay mission state machine."]
1495    MAV_CMD_CONDITION_DELAY = 112,
1496    #[doc = "Ascend/descend to target altitude at specified rate. Delay mission state machine until desired altitude reached."]
1497    MAV_CMD_CONDITION_CHANGE_ALT = 113,
1498    #[doc = "Delay mission state machine until within desired distance of next NAV point."]
1499    MAV_CMD_CONDITION_DISTANCE = 114,
1500    #[doc = "Reach a certain target angle."]
1501    MAV_CMD_CONDITION_YAW = 115,
1502    #[doc = "NOP - This command is only used to mark the upper limit of the CONDITION commands in the enumeration"]
1503    MAV_CMD_CONDITION_LAST = 159,
1504    #[doc = "Set system mode."]
1505    MAV_CMD_DO_SET_MODE = 176,
1506    #[doc = "Jump to the desired command in the mission list.  Repeat this action only the specified number of times"]
1507    MAV_CMD_DO_JUMP = 177,
1508    #[doc = "Change speed and/or throttle set points. The value persists until it is overridden or there is a mode change"]
1509    MAV_CMD_DO_CHANGE_SPEED = 178,
1510    #[doc = "Sets the home position to either to the current position or a specified position.           The home position is the default position that the system will return to and land on.           The position is set automatically by the system during the takeoff (and may also be set using this command).           Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
1511    MAV_CMD_DO_SET_HOME = 179,
1512    #[deprecated = " See `PARAM_SET` (Deprecated since 2024-04)"]
1513    #[doc = "Set a system parameter.  Caution!  Use of this command requires knowledge of the numeric enumeration value of the parameter."]
1514    MAV_CMD_DO_SET_PARAMETER = 180,
1515    #[doc = "Set a relay to a condition."]
1516    MAV_CMD_DO_SET_RELAY = 181,
1517    #[doc = "Cycle a relay on and off for a desired number of cycles with a desired period."]
1518    MAV_CMD_DO_REPEAT_RELAY = 182,
1519    #[doc = "Set a servo to a desired PWM value."]
1520    MAV_CMD_DO_SET_SERVO = 183,
1521    #[doc = "Cycle a between its nominal setting and a desired PWM for a desired number of cycles with a desired period."]
1522    MAV_CMD_DO_REPEAT_SERVO = 184,
1523    #[doc = "0.5); the ACK should be either MAV_RESULT_FAILED or MAV_RESULT_UNSUPPORTED."]
1524    MAV_CMD_DO_FLIGHTTERMINATION = 185,
1525    #[doc = "Change altitude set point."]
1526    MAV_CMD_DO_CHANGE_ALTITUDE = 186,
1527    #[doc = "Sets actuators (e.g. servos) to a desired value. The actuator numbers are mapped to specific outputs (e.g. on any MAIN or AUX PWM or UAVCAN) using a flight-stack specific mechanism (i.e. a parameter)."]
1528    MAV_CMD_DO_SET_ACTUATOR = 187,
1529    #[doc = "Mission item to specify the start of a failsafe/landing return-path segment (the end of the segment is the next MAV_CMD_DO_LAND_START item).           A vehicle that is using missions for landing (e.g. in a return mode) will join the mission on the closest path of the return-path segment (instead of MAV_CMD_DO_LAND_START or the nearest waypoint).           The main use case is to minimize the failsafe flight path in corridor missions, where the inbound/outbound paths are constrained (by geofences) to the same particular path.           The MAV_CMD_NAV_RETURN_PATH_START would be placed at the start of the return path.           If a failsafe occurs on the outbound path the vehicle will move to the nearest point on the return path (which is parallel for this kind of mission), effectively turning round and following the shortest path to landing.           If a failsafe occurs on the inbound path the vehicle is already on the return segment and will continue to landing.           The Latitude/Longitude/Altitude are optional, and may be set to 0 if not needed.           If specified, the item defines the waypoint at which the return segment starts.           If sent using as a command, the vehicle will perform a mission landing (using the land segment if defined) or reject the command if mission landings are not supported, or no mission landing is defined. When used as a command any position information in the command is ignored."]
1530    MAV_CMD_DO_RETURN_PATH_START = 188,
1531    #[doc = "Mission item to mark the start of a mission landing pattern, or a command to land with a mission landing pattern.          When used in a mission, this is a marker for the start of a sequence of mission items that represent a landing pattern.         It should be followed by a navigation item that defines the first waypoint of the landing sequence.         The start marker positional params are used only for selecting what landing pattern to use if several are defined in the mission (the selected pattern will be the one with the marker position that is closest to the vehicle when a landing is commanded).         If the marker item position has zero-values for latitude, longitude, and altitude, then landing pattern selection is instead based on the position of the first waypoint in the landing sequence.  \t      When sent as a command it triggers a landing using a mission landing pattern. \t      The location parameters are not used in this case, and should be set to 0."]
1532    MAV_CMD_DO_LAND_START = 189,
1533    #[doc = "Mission command to perform a landing from a rally point."]
1534    MAV_CMD_DO_RALLY_LAND = 190,
1535    #[doc = "Mission command to safely abort an autonomous landing."]
1536    MAV_CMD_DO_GO_AROUND = 191,
1537    #[doc = "Reposition the vehicle to a specific WGS84 global position. This command is intended for guided commands (for missions use MAV_CMD_NAV_WAYPOINT instead)."]
1538    MAV_CMD_DO_REPOSITION = 192,
1539    #[doc = "If in a GPS controlled position mode, hold the current position or continue."]
1540    MAV_CMD_DO_PAUSE_CONTINUE = 193,
1541    #[doc = "Set moving direction to forward or reverse."]
1542    MAV_CMD_DO_SET_REVERSE = 194,
1543    #[doc = "Sets the region of interest (ROI) to a location. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal is not to react to this message."]
1544    MAV_CMD_DO_SET_ROI_LOCATION = 195,
1545    #[doc = "Sets the region of interest (ROI) to be toward next waypoint, with optional pitch/roll/yaw offset. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message."]
1546    MAV_CMD_DO_SET_ROI_WPNEXT_OFFSET = 196,
1547    #[doc = "Cancels any previous ROI command returning the vehicle/sensors to default flight characteristics. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message. After this command the gimbal manager should go back to manual input if available, and otherwise assume a neutral position."]
1548    MAV_CMD_DO_SET_ROI_NONE = 197,
1549    #[doc = "Mount tracks system with specified system ID. Determination of target vehicle position may be done with GLOBAL_POSITION_INT or any other means. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message."]
1550    MAV_CMD_DO_SET_ROI_SYSID = 198,
1551    #[doc = "Control onboard camera system."]
1552    MAV_CMD_DO_CONTROL_VIDEO = 200,
1553    #[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
1554    #[doc = "Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras."]
1555    MAV_CMD_DO_SET_ROI = 201,
1556    #[doc = "Configure digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see <https://mavlink.io/en/services/camera_def.html> )."]
1557    MAV_CMD_DO_DIGICAM_CONFIGURE = 202,
1558    #[doc = "Control digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see <https://mavlink.io/en/services/camera_def.html> )."]
1559    MAV_CMD_DO_DIGICAM_CONTROL = 203,
1560    #[deprecated = "This message has been superseded by MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE` (Deprecated since 2020-01)"]
1561    #[doc = "Mission command to configure a camera or antenna mount"]
1562    MAV_CMD_DO_MOUNT_CONFIGURE = 204,
1563    #[deprecated = "This message is ambiguous and inconsistent. It has been superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW and `MAV_CMD_DO_SET_ROI_*` variants. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
1564    #[doc = "Mission command to control a camera or antenna mount"]
1565    MAV_CMD_DO_MOUNT_CONTROL = 205,
1566    #[doc = "Mission command to set camera trigger distance for this flight. The camera is triggered each time this distance is exceeded. This command can also be used to set the shutter integration time for the camera."]
1567    MAV_CMD_DO_SET_CAM_TRIGG_DIST = 206,
1568    #[doc = "Enable the geofence.           This can be used in a mission or via the command protocol.           The persistence/lifetime of the setting is undefined.           Depending on flight stack implementation it may persist until superseded, or it may revert to a system default at the end of a mission.           Flight stacks typically reset the setting to system defaults on reboot."]
1569    MAV_CMD_DO_FENCE_ENABLE = 207,
1570    #[doc = "Mission item/command to release a parachute or enable/disable auto release."]
1571    MAV_CMD_DO_PARACHUTE = 208,
1572    #[doc = "Command to perform motor test."]
1573    MAV_CMD_DO_MOTOR_TEST = 209,
1574    #[doc = "Change to/from inverted flight."]
1575    MAV_CMD_DO_INVERTED_FLIGHT = 210,
1576    #[doc = "Mission command to operate a gripper."]
1577    MAV_CMD_DO_GRIPPER = 211,
1578    #[doc = "Enable/disable autotune."]
1579    MAV_CMD_DO_AUTOTUNE_ENABLE = 212,
1580    #[doc = "Sets a desired vehicle turn angle and speed change."]
1581    MAV_CMD_NAV_SET_YAW_SPEED = 213,
1582    #[doc = "Mission command to set camera trigger interval for this flight. If triggering is enabled, the camera is triggered each time this interval expires. This command can also be used to set the shutter integration time for the camera."]
1583    MAV_CMD_DO_SET_CAM_TRIGG_INTERVAL = 214,
1584    #[deprecated = " See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
1585    #[doc = "Mission command to control a camera or antenna mount, using a quaternion as reference."]
1586    MAV_CMD_DO_MOUNT_CONTROL_QUAT = 220,
1587    #[doc = "set id of master controller"]
1588    MAV_CMD_DO_GUIDED_MASTER = 221,
1589    #[doc = "Set limits for external control"]
1590    MAV_CMD_DO_GUIDED_LIMITS = 222,
1591    #[doc = "Control vehicle engine. This is interpreted by the vehicles engine controller to change the target engine state. It is intended for vehicles with internal combustion engines"]
1592    MAV_CMD_DO_ENGINE_CONTROL = 223,
1593    #[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).           If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items. \t  Note that mission jump repeat counters are not reset unless param2 is set (see MAV_CMD_DO_JUMP param2).            This command may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.           If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.           If the system is not in mission mode this command must not trigger a switch to mission mode.            The mission may be \"reset\" using param2.           Resetting sets jump counters to initial values (to reset counters without changing the current mission item set the param1 to `-1`).           Resetting also explicitly changes a mission state of MISSION_STATE_COMPLETE to MISSION_STATE_PAUSED or MISSION_STATE_ACTIVE, potentially allowing it to resume when it is (next) in a mission mode.  \t  The command will ACK with MAV_RESULT_FAILED if the sequence number is out of range (including if there is no mission item)."]
1594    MAV_CMD_DO_SET_MISSION_CURRENT = 224,
1595    #[doc = "NOP - This command is only used to mark the upper limit of the DO commands in the enumeration"]
1596    MAV_CMD_DO_LAST = 240,
1597    #[doc = "Trigger calibration. This command will be only accepted if in pre-flight mode. Except for Temperature Calibration, only one sensor should be set in a single message and all others should be zero."]
1598    MAV_CMD_PREFLIGHT_CALIBRATION = 241,
1599    #[doc = "Set sensor offsets. This command will be only accepted if in pre-flight mode."]
1600    MAV_CMD_PREFLIGHT_SET_SENSOR_OFFSETS = 242,
1601    #[doc = "Trigger UAVCAN configuration (actuator ID assignment and direction mapping). Note that this maps to the legacy UAVCAN v0 function UAVCAN_ENUMERATE, which is intended to be executed just once during initial vehicle configuration (it is not a normal pre-flight command and has been poorly named)."]
1602    MAV_CMD_PREFLIGHT_UAVCAN = 243,
1603    #[doc = "Request storage of different parameter values and logs. This command will be only accepted if in pre-flight mode."]
1604    MAV_CMD_PREFLIGHT_STORAGE = 245,
1605    #[doc = "Request the reboot or shutdown of system components."]
1606    MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN = 246,
1607    #[doc = "Override current mission with command to pause mission, pause mission and move to position, continue/resume mission. When param 1 indicates that the mission is paused (MAV_GOTO_DO_HOLD), param 2 defines whether it holds in place or moves to another position."]
1608    MAV_CMD_OVERRIDE_GOTO = 252,
1609    #[doc = "Mission command to set a Camera Auto Mount Pivoting Oblique Survey (Replaces CAM_TRIGG_DIST for this purpose). The camera is triggered each time this distance is exceeded, then the mount moves to the next position. Params 4~6 set-up the angle limits and number of positions for oblique survey, where mount-enabled vehicles automatically roll the camera between shots to emulate an oblique camera setup (providing an increased HFOV). This command can also be used to set the shutter integration time for the camera."]
1610    MAV_CMD_OBLIQUE_SURVEY = 260,
1611    #[doc = "Enable the specified standard MAVLink mode.           If the specified mode is not supported, the vehicle should ACK with MAV_RESULT_FAILED.           See <https://mavlink.io/en/services/standard_modes.html>"]
1612    MAV_CMD_DO_SET_STANDARD_MODE = 262,
1613    #[doc = "start running a mission"]
1614    MAV_CMD_MISSION_START = 300,
1615    #[doc = "Actuator testing command. This is similar to MAV_CMD_DO_MOTOR_TEST but operates on the level of output functions, i.e. it is possible to test Motor1 independent from which output it is configured on. Autopilots must NACK this command with MAV_RESULT_TEMPORARILY_REJECTED while armed."]
1616    MAV_CMD_ACTUATOR_TEST = 310,
1617    #[doc = "Actuator configuration command."]
1618    MAV_CMD_CONFIGURE_ACTUATOR = 311,
1619    #[doc = "Arms / Disarms a component"]
1620    MAV_CMD_COMPONENT_ARM_DISARM = 400,
1621    #[doc = "Instructs a target system to run pre-arm checks.           This allows preflight checks to be run on demand, which may be useful on systems that normally run them at low rate, or which do not trigger checks when the armable state might have changed.           This command should return MAV_RESULT_ACCEPTED if it will run the checks.           The results of the checks are usually then reported in SYS_STATUS messages (this is system-specific).           The command should return MAV_RESULT_TEMPORARILY_REJECTED if the system is already armed."]
1622    MAV_CMD_RUN_PREARM_CHECKS = 401,
1623    #[doc = "Turns illuminators ON/OFF. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
1624    MAV_CMD_ILLUMINATOR_ON_OFF = 405,
1625    #[doc = "Configures illuminator settings. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
1626    MAV_CMD_DO_ILLUMINATOR_CONFIGURE = 406,
1627    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2022-04)"]
1628    #[doc = "Request the home position from the vehicle. \t  The vehicle will ACK the command and then emit the HOME_POSITION message."]
1629    MAV_CMD_GET_HOME_POSITION = 410,
1630    #[doc = "Inject artificial failure for testing purposes. Note that autopilots should implement an additional protection before accepting this command such as a specific param setting."]
1631    MAV_CMD_INJECT_FAILURE = 420,
1632    #[doc = "Starts receiver pairing."]
1633    MAV_CMD_START_RX_PAIR = 500,
1634    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2022-04)"]
1635    #[doc = "Request the interval between messages for a particular MAVLink message ID.           The receiver should ACK the command and then emit its response in a MESSAGE_INTERVAL message."]
1636    MAV_CMD_GET_MESSAGE_INTERVAL = 510,
1637    #[doc = "Set the interval between messages for a particular MAVLink message ID. This interface replaces REQUEST_DATA_STREAM."]
1638    MAV_CMD_SET_MESSAGE_INTERVAL = 511,
1639    #[doc = "Request the target system(s) emit a single instance of a specified message (i.e. a \"one-shot\" version of MAV_CMD_SET_MESSAGE_INTERVAL)."]
1640    MAV_CMD_REQUEST_MESSAGE = 512,
1641    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1642    #[doc = "Request MAVLink protocol version compatibility. All receivers should ACK the command and then emit their capabilities in an PROTOCOL_VERSION message"]
1643    MAV_CMD_REQUEST_PROTOCOL_VERSION = 519,
1644    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1645    #[doc = "Request autopilot capabilities. The receiver should ACK the command and then emit its capabilities in an AUTOPILOT_VERSION message"]
1646    MAV_CMD_REQUEST_AUTOPILOT_CAPABILITIES = 520,
1647    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1648    #[doc = "Request camera information (CAMERA_INFORMATION)."]
1649    MAV_CMD_REQUEST_CAMERA_INFORMATION = 521,
1650    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1651    #[doc = "Request camera settings (CAMERA_SETTINGS)."]
1652    MAV_CMD_REQUEST_CAMERA_SETTINGS = 522,
1653    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1654    #[doc = "Request storage information (STORAGE_INFORMATION). Use the command's target_component to target a specific component's storage."]
1655    MAV_CMD_REQUEST_STORAGE_INFORMATION = 525,
1656    #[doc = "Format a storage medium. Once format is complete, a STORAGE_INFORMATION message is sent. Use the command's target_component to target a specific component's storage."]
1657    MAV_CMD_STORAGE_FORMAT = 526,
1658    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1659    #[doc = "Request camera capture status (CAMERA_CAPTURE_STATUS)"]
1660    MAV_CMD_REQUEST_CAMERA_CAPTURE_STATUS = 527,
1661    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1662    #[doc = "Request flight information (FLIGHT_INFORMATION)"]
1663    MAV_CMD_REQUEST_FLIGHT_INFORMATION = 528,
1664    #[doc = "Reset all camera settings to Factory Default"]
1665    MAV_CMD_RESET_CAMERA_SETTINGS = 529,
1666    #[doc = "Set camera running mode. Use NaN for reserved values. GCS will send a MAV_CMD_REQUEST_VIDEO_STREAM_STATUS command after a mode change if the camera supports video streaming."]
1667    MAV_CMD_SET_CAMERA_MODE = 530,
1668    #[doc = "Set camera zoom. Camera must respond with a CAMERA_SETTINGS message (on success)."]
1669    MAV_CMD_SET_CAMERA_ZOOM = 531,
1670    #[doc = "Set camera focus. Camera must respond with a CAMERA_SETTINGS message (on success)."]
1671    MAV_CMD_SET_CAMERA_FOCUS = 532,
1672    #[doc = "Set that a particular storage is the preferred location for saving photos, videos, and/or other media (e.g. to set that an SD card is used for storing videos).           There can only be one preferred save location for each particular media type: setting a media usage flag will clear/reset that same flag if set on any other storage.           If no flag is set the system should use its default storage.           A target system can choose to always use default storage, in which case it should ACK the command with MAV_RESULT_UNSUPPORTED.           A target system can choose to not allow a particular storage to be set as preferred storage, in which case it should ACK the command with MAV_RESULT_DENIED."]
1673    MAV_CMD_SET_STORAGE_USAGE = 533,
1674    #[doc = "Set camera source. Changes the camera's active sources on cameras with multiple image sensors."]
1675    MAV_CMD_SET_CAMERA_SOURCE = 534,
1676    #[doc = "Tagged jump target. Can be jumped to with MAV_CMD_DO_JUMP_TAG."]
1677    MAV_CMD_JUMP_TAG = 600,
1678    #[doc = "Jump to the matching tag in the mission list. Repeat this action for the specified number of times. A mission should contain a single matching tag for each jump. If this is not the case then a jump to a missing tag should complete the mission, and a jump where there are multiple matching tags should always select the one with the lowest mission sequence number."]
1679    MAV_CMD_DO_JUMP_TAG = 601,
1680    #[doc = "Set gimbal manager pitch/yaw setpoints (low rate command). It is possible to set combinations of the values below. E.g. an angle as well as a desired angular rate can be used to get to this angle at a certain angular rate, or an angular rate only will result in continuous turning. NaN is to be used to signal unset. Note: only the gimbal manager will react to this command - it will be ignored by a gimbal device. Use GIMBAL_MANAGER_SET_PITCHYAW if you need to stream pitch/yaw setpoints at higher rate."]
1681    MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW = 1000,
1682    #[doc = "Gimbal configuration to set which sysid/compid is in primary and secondary control."]
1683    MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE = 1001,
1684    #[doc = "Start image capture sequence. CAMERA_IMAGE_CAPTURED must be emitted after each capture.            Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID.           It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID).           It is also needed to specify the target camera in missions.            When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero).           If the param1 is 0 the autopilot should do both.            When sent in a command the target MAVLink address is set using target_component.           If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist).           If addressed to a MAVLink camera, param 1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED.           If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels."]
1685    MAV_CMD_IMAGE_START_CAPTURE = 2000,
1686    #[doc = "Stop image capture sequence.            Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID.           It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID).           It is also needed to specify the target camera in missions.            When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero).           If the param1 is 0 the autopilot should do both.            When sent in a command the target MAVLink address is set using target_component.           If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist).           If addressed to a MAVLink camera, param1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED.           If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels."]
1687    MAV_CMD_IMAGE_STOP_CAPTURE = 2001,
1688    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1689    #[doc = "Re-request a CAMERA_IMAGE_CAPTURED message."]
1690    MAV_CMD_REQUEST_CAMERA_IMAGE_CAPTURE = 2002,
1691    #[doc = "Enable or disable on-board camera triggering system."]
1692    MAV_CMD_DO_TRIGGER_CONTROL = 2003,
1693    #[doc = "If the camera supports point visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_POINT is set), this command allows to initiate the tracking."]
1694    MAV_CMD_CAMERA_TRACK_POINT = 2004,
1695    #[doc = "If the camera supports rectangle visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE is set), this command allows to initiate the tracking."]
1696    MAV_CMD_CAMERA_TRACK_RECTANGLE = 2005,
1697    #[doc = "Stops ongoing tracking."]
1698    MAV_CMD_CAMERA_STOP_TRACKING = 2010,
1699    #[doc = "Starts video capture (recording)."]
1700    MAV_CMD_VIDEO_START_CAPTURE = 2500,
1701    #[doc = "Stop the current video capture (recording)."]
1702    MAV_CMD_VIDEO_STOP_CAPTURE = 2501,
1703    #[doc = "Start video streaming"]
1704    MAV_CMD_VIDEO_START_STREAMING = 2502,
1705    #[doc = "Stop the given video stream"]
1706    MAV_CMD_VIDEO_STOP_STREAMING = 2503,
1707    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1708    #[doc = "Request video stream information (VIDEO_STREAM_INFORMATION)"]
1709    MAV_CMD_REQUEST_VIDEO_STREAM_INFORMATION = 2504,
1710    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1711    #[doc = "Request video stream status (VIDEO_STREAM_STATUS)"]
1712    MAV_CMD_REQUEST_VIDEO_STREAM_STATUS = 2505,
1713    #[doc = "Request to start streaming logging data over MAVLink (see also LOGGING_DATA message)"]
1714    MAV_CMD_LOGGING_START = 2510,
1715    #[doc = "Request to stop streaming log data over MAVLink"]
1716    MAV_CMD_LOGGING_STOP = 2511,
1717    MAV_CMD_AIRFRAME_CONFIGURATION = 2520,
1718    #[doc = "Request to start/stop transmitting over the high latency telemetry"]
1719    MAV_CMD_CONTROL_HIGH_LATENCY = 2600,
1720    #[doc = "Create a panorama at the current position"]
1721    MAV_CMD_PANORAMA_CREATE = 2800,
1722    #[doc = "Request VTOL transition"]
1723    MAV_CMD_DO_VTOL_TRANSITION = 3000,
1724    #[doc = "Request authorization to arm the vehicle to a external entity, the arm authorizer is responsible to request all data that is needs from the vehicle before authorize or deny the request. \t\tIf approved the COMMAND_ACK message progress field should be set with period of time that this authorization is valid in seconds. \t\tIf the authorization is denied COMMAND_ACK.result_param2 should be set with one of the reasons in ARM_AUTH_DENIED_REASON."]
1725    MAV_CMD_ARM_AUTHORIZATION_REQUEST = 3001,
1726    #[doc = "This command sets the submode to standard guided when vehicle is in guided mode. The vehicle holds position and altitude and the user can input the desired velocities along all three axes."]
1727    MAV_CMD_SET_GUIDED_SUBMODE_STANDARD = 4000,
1728    #[doc = "This command sets submode circle when vehicle is in guided mode. Vehicle flies along a circle facing the center of the circle. The user can input the velocity along the circle and change the radius. If no input is given the vehicle will hold position."]
1729    MAV_CMD_SET_GUIDED_SUBMODE_CIRCLE = 4001,
1730    #[doc = "Delay mission state machine until gate has been reached."]
1731    MAV_CMD_CONDITION_GATE = 4501,
1732    #[doc = "Fence return point (there can only be one such point in a geofence definition). If rally points are supported they should be used instead."]
1733    MAV_CMD_NAV_FENCE_RETURN_POINT = 5000,
1734    #[doc = "Fence vertex for an inclusion polygon (the polygon must not be self-intersecting). The vehicle must stay within this area. Minimum of 3 vertices required.           The vertices for a polygon must be sent sequentially, each with param1 set to the total number of vertices in the polygon."]
1735    MAV_CMD_NAV_FENCE_POLYGON_VERTEX_INCLUSION = 5001,
1736    #[doc = "Fence vertex for an exclusion polygon (the polygon must not be self-intersecting). The vehicle must stay outside this area. Minimum of 3 vertices required.           The vertices for a polygon must be sent sequentially, each with param1 set to the total number of vertices in the polygon."]
1737    MAV_CMD_NAV_FENCE_POLYGON_VERTEX_EXCLUSION = 5002,
1738    #[doc = "Circular fence area. The vehicle must stay inside this area."]
1739    MAV_CMD_NAV_FENCE_CIRCLE_INCLUSION = 5003,
1740    #[doc = "Circular fence area. The vehicle must stay outside this area."]
1741    MAV_CMD_NAV_FENCE_CIRCLE_EXCLUSION = 5004,
1742    #[doc = "Rally point. You can have multiple rally points defined."]
1743    MAV_CMD_NAV_RALLY_POINT = 5100,
1744    #[doc = "Commands the vehicle to respond with a sequence of messages UAVCAN_NODE_INFO, one message per every UAVCAN node that is online. Note that some of the response messages can be lost, which the receiver can detect easily by checking whether every received UAVCAN_NODE_STATUS has a matching message UAVCAN_NODE_INFO received earlier; if not, this command should be sent again in order to request re-transmission of the node information messages."]
1745    MAV_CMD_UAVCAN_GET_NODE_INFO = 5200,
1746    #[doc = "Change state of safety switch."]
1747    MAV_CMD_DO_SET_SAFETY_SWITCH_STATE = 5300,
1748    #[doc = "Trigger the start of an ADSB-out IDENT. This should only be used when requested to do so by an Air Traffic Controller in controlled airspace. This starts the IDENT which is then typically held for 18 seconds by the hardware per the Mode A, C, and S transponder spec."]
1749    MAV_CMD_DO_ADSB_OUT_IDENT = 10001,
1750    #[deprecated = "  (Deprecated since 2021-06)"]
1751    #[doc = "Deploy payload on a Lat / Lon / Alt position. This includes the navigation to reach the required release position and velocity."]
1752    MAV_CMD_PAYLOAD_PREPARE_DEPLOY = 30001,
1753    #[deprecated = "  (Deprecated since 2021-06)"]
1754    #[doc = "Control the payload deployment."]
1755    MAV_CMD_PAYLOAD_CONTROL_DEPLOY = 30002,
1756    #[doc = "Magnetometer calibration based on provided known yaw. This allows for fast calibration using WMM field tables in the vehicle, given only the known yaw of the vehicle. If Latitude and longitude are both zero then use the current vehicle location."]
1757    MAV_CMD_FIXED_MAG_CAL_YAW = 42006,
1758    #[doc = "Command to operate winch."]
1759    MAV_CMD_DO_WINCH = 42600,
1760    #[doc = "Provide an external position estimate for use when dead-reckoning. This is meant to be used for occasional position resets that may be provided by a external system such as a remote pilot using landmarks over a video link."]
1761    MAV_CMD_EXTERNAL_POSITION_ESTIMATE = 43003,
1762    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1763    MAV_CMD_WAYPOINT_USER_1 = 31000,
1764    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1765    MAV_CMD_WAYPOINT_USER_2 = 31001,
1766    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1767    MAV_CMD_WAYPOINT_USER_3 = 31002,
1768    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1769    MAV_CMD_WAYPOINT_USER_4 = 31003,
1770    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1771    MAV_CMD_WAYPOINT_USER_5 = 31004,
1772    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1773    MAV_CMD_SPATIAL_USER_1 = 31005,
1774    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1775    MAV_CMD_SPATIAL_USER_2 = 31006,
1776    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1777    MAV_CMD_SPATIAL_USER_3 = 31007,
1778    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1779    MAV_CMD_SPATIAL_USER_4 = 31008,
1780    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1781    MAV_CMD_SPATIAL_USER_5 = 31009,
1782    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1783    MAV_CMD_USER_1 = 31010,
1784    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1785    MAV_CMD_USER_2 = 31011,
1786    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1787    MAV_CMD_USER_3 = 31012,
1788    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1789    MAV_CMD_USER_4 = 31013,
1790    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1791    MAV_CMD_USER_5 = 31014,
1792    #[doc = "Request forwarding of CAN packets from the given CAN bus to this component. CAN Frames are sent using CAN_FRAME and CANFD_FRAME messages"]
1793    MAV_CMD_CAN_FORWARD = 32000,
1794    #[doc = "Mission command to reset Maximum Power Point Tracker (MPPT)"]
1795    MAV_CMD_RESET_MPPT = 40001,
1796    #[doc = "Mission command to perform a power cycle on payload"]
1797    MAV_CMD_PAYLOAD_CONTROL = 40002,
1798}
1799impl MavCmd {
1800    pub const DEFAULT: Self = Self::MAV_CMD_NAV_WAYPOINT;
1801}
1802impl Default for MavCmd {
1803    fn default() -> Self {
1804        Self::DEFAULT
1805    }
1806}
1807#[cfg_attr(feature = "ts", derive(TS))]
1808#[cfg_attr(feature = "ts", ts(export))]
1809#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1810#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1811#[cfg_attr(feature = "serde", serde(tag = "type"))]
1812#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1813#[repr(u32)]
1814#[doc = "Possible actions an aircraft can take to avoid a collision."]
1815pub enum MavCollisionAction {
1816    #[doc = "Ignore any potential collisions"]
1817    MAV_COLLISION_ACTION_NONE = 0,
1818    #[doc = "Report potential collision"]
1819    MAV_COLLISION_ACTION_REPORT = 1,
1820    #[doc = "Ascend or Descend to avoid threat"]
1821    MAV_COLLISION_ACTION_ASCEND_OR_DESCEND = 2,
1822    #[doc = "Move horizontally to avoid threat"]
1823    MAV_COLLISION_ACTION_MOVE_HORIZONTALLY = 3,
1824    #[doc = "Aircraft to move perpendicular to the collision's velocity vector"]
1825    MAV_COLLISION_ACTION_MOVE_PERPENDICULAR = 4,
1826    #[doc = "Aircraft to fly directly back to its launch point"]
1827    MAV_COLLISION_ACTION_RTL = 5,
1828    #[doc = "Aircraft to stop in place"]
1829    MAV_COLLISION_ACTION_HOVER = 6,
1830}
1831impl MavCollisionAction {
1832    pub const DEFAULT: Self = Self::MAV_COLLISION_ACTION_NONE;
1833}
1834impl Default for MavCollisionAction {
1835    fn default() -> Self {
1836        Self::DEFAULT
1837    }
1838}
1839#[cfg_attr(feature = "ts", derive(TS))]
1840#[cfg_attr(feature = "ts", ts(export))]
1841#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1842#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1843#[cfg_attr(feature = "serde", serde(tag = "type"))]
1844#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1845#[repr(u32)]
1846#[doc = "Source of information about this collision."]
1847pub enum MavCollisionSrc {
1848    #[doc = "ID field references ADSB_VEHICLE packets"]
1849    MAV_COLLISION_SRC_ADSB = 0,
1850    #[doc = "ID field references MAVLink SRC ID"]
1851    MAV_COLLISION_SRC_MAVLINK_GPS_GLOBAL_INT = 1,
1852}
1853impl MavCollisionSrc {
1854    pub const DEFAULT: Self = Self::MAV_COLLISION_SRC_ADSB;
1855}
1856impl Default for MavCollisionSrc {
1857    fn default() -> Self {
1858        Self::DEFAULT
1859    }
1860}
1861#[cfg_attr(feature = "ts", derive(TS))]
1862#[cfg_attr(feature = "ts", ts(export))]
1863#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1864#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1865#[cfg_attr(feature = "serde", serde(tag = "type"))]
1866#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1867#[repr(u32)]
1868#[doc = "Aircraft-rated danger from this threat."]
1869pub enum MavCollisionThreatLevel {
1870    #[doc = "Not a threat"]
1871    MAV_COLLISION_THREAT_LEVEL_NONE = 0,
1872    #[doc = "Craft is mildly concerned about this threat"]
1873    MAV_COLLISION_THREAT_LEVEL_LOW = 1,
1874    #[doc = "Craft is panicking, and may take actions to avoid threat"]
1875    MAV_COLLISION_THREAT_LEVEL_HIGH = 2,
1876}
1877impl MavCollisionThreatLevel {
1878    pub const DEFAULT: Self = Self::MAV_COLLISION_THREAT_LEVEL_NONE;
1879}
1880impl Default for MavCollisionThreatLevel {
1881    fn default() -> Self {
1882        Self::DEFAULT
1883    }
1884}
1885#[cfg_attr(feature = "ts", derive(TS))]
1886#[cfg_attr(feature = "ts", ts(export))]
1887#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1888#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1889#[cfg_attr(feature = "serde", serde(tag = "type"))]
1890#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1891#[repr(u32)]
1892#[doc = "Component ids (values) for the different types and instances of onboard hardware/software that might make up a MAVLink system (autopilot, cameras, servos, GPS systems, avoidance systems etc.).       Components must use the appropriate ID in their source address when sending messages. Components can also use IDs to determine if they are the intended recipient of an incoming message. The MAV_COMP_ID_ALL value is used to indicate messages that must be processed by all components.       When creating new entries, components that can have multiple instances (e.g. cameras, servos etc.) should be allocated sequential values. An appropriate number of values should be left free after these components to allow the number of instances to be expanded."]
1893pub enum MavComponent {
1894    #[doc = "Target id (target_component) used to broadcast messages to all components of the receiving system. Components should attempt to process messages with this component ID and forward to components on any other interfaces. Note: This is not a valid *source* component id for a message."]
1895    MAV_COMP_ID_ALL = 0,
1896    #[doc = "System flight controller component (\"autopilot\"). Only one autopilot is expected in a particular system."]
1897    MAV_COMP_ID_AUTOPILOT1 = 1,
1898    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1899    MAV_COMP_ID_USER1 = 25,
1900    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1901    MAV_COMP_ID_USER2 = 26,
1902    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1903    MAV_COMP_ID_USER3 = 27,
1904    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1905    MAV_COMP_ID_USER4 = 28,
1906    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1907    MAV_COMP_ID_USER5 = 29,
1908    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1909    MAV_COMP_ID_USER6 = 30,
1910    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1911    MAV_COMP_ID_USER7 = 31,
1912    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1913    MAV_COMP_ID_USER8 = 32,
1914    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1915    MAV_COMP_ID_USER9 = 33,
1916    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1917    MAV_COMP_ID_USER10 = 34,
1918    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1919    MAV_COMP_ID_USER11 = 35,
1920    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1921    MAV_COMP_ID_USER12 = 36,
1922    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1923    MAV_COMP_ID_USER13 = 37,
1924    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1925    MAV_COMP_ID_USER14 = 38,
1926    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1927    MAV_COMP_ID_USER15 = 39,
1928    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1929    MAV_COMP_ID_USER16 = 40,
1930    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1931    MAV_COMP_ID_USER17 = 41,
1932    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1933    MAV_COMP_ID_USER18 = 42,
1934    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1935    MAV_COMP_ID_USER19 = 43,
1936    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1937    MAV_COMP_ID_USER20 = 44,
1938    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1939    MAV_COMP_ID_USER21 = 45,
1940    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1941    MAV_COMP_ID_USER22 = 46,
1942    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1943    MAV_COMP_ID_USER23 = 47,
1944    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1945    MAV_COMP_ID_USER24 = 48,
1946    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1947    MAV_COMP_ID_USER25 = 49,
1948    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1949    MAV_COMP_ID_USER26 = 50,
1950    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1951    MAV_COMP_ID_USER27 = 51,
1952    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1953    MAV_COMP_ID_USER28 = 52,
1954    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1955    MAV_COMP_ID_USER29 = 53,
1956    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1957    MAV_COMP_ID_USER30 = 54,
1958    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1959    MAV_COMP_ID_USER31 = 55,
1960    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1961    MAV_COMP_ID_USER32 = 56,
1962    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1963    MAV_COMP_ID_USER33 = 57,
1964    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1965    MAV_COMP_ID_USER34 = 58,
1966    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1967    MAV_COMP_ID_USER35 = 59,
1968    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1969    MAV_COMP_ID_USER36 = 60,
1970    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1971    MAV_COMP_ID_USER37 = 61,
1972    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1973    MAV_COMP_ID_USER38 = 62,
1974    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1975    MAV_COMP_ID_USER39 = 63,
1976    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1977    MAV_COMP_ID_USER40 = 64,
1978    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1979    MAV_COMP_ID_USER41 = 65,
1980    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1981    MAV_COMP_ID_USER42 = 66,
1982    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1983    MAV_COMP_ID_USER43 = 67,
1984    #[doc = "Telemetry radio (e.g. SiK radio, or other component that emits RADIO_STATUS messages)."]
1985    MAV_COMP_ID_TELEMETRY_RADIO = 68,
1986    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1987    MAV_COMP_ID_USER45 = 69,
1988    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1989    MAV_COMP_ID_USER46 = 70,
1990    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1991    MAV_COMP_ID_USER47 = 71,
1992    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1993    MAV_COMP_ID_USER48 = 72,
1994    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1995    MAV_COMP_ID_USER49 = 73,
1996    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1997    MAV_COMP_ID_USER50 = 74,
1998    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1999    MAV_COMP_ID_USER51 = 75,
2000    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2001    MAV_COMP_ID_USER52 = 76,
2002    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2003    MAV_COMP_ID_USER53 = 77,
2004    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2005    MAV_COMP_ID_USER54 = 78,
2006    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2007    MAV_COMP_ID_USER55 = 79,
2008    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2009    MAV_COMP_ID_USER56 = 80,
2010    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2011    MAV_COMP_ID_USER57 = 81,
2012    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2013    MAV_COMP_ID_USER58 = 82,
2014    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2015    MAV_COMP_ID_USER59 = 83,
2016    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2017    MAV_COMP_ID_USER60 = 84,
2018    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2019    MAV_COMP_ID_USER61 = 85,
2020    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2021    MAV_COMP_ID_USER62 = 86,
2022    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2023    MAV_COMP_ID_USER63 = 87,
2024    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2025    MAV_COMP_ID_USER64 = 88,
2026    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2027    MAV_COMP_ID_USER65 = 89,
2028    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2029    MAV_COMP_ID_USER66 = 90,
2030    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2031    MAV_COMP_ID_USER67 = 91,
2032    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2033    MAV_COMP_ID_USER68 = 92,
2034    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2035    MAV_COMP_ID_USER69 = 93,
2036    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2037    MAV_COMP_ID_USER70 = 94,
2038    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2039    MAV_COMP_ID_USER71 = 95,
2040    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2041    MAV_COMP_ID_USER72 = 96,
2042    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2043    MAV_COMP_ID_USER73 = 97,
2044    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2045    MAV_COMP_ID_USER74 = 98,
2046    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2047    MAV_COMP_ID_USER75 = 99,
2048    #[doc = "Camera #1."]
2049    MAV_COMP_ID_CAMERA = 100,
2050    #[doc = "Camera #2."]
2051    MAV_COMP_ID_CAMERA2 = 101,
2052    #[doc = "Camera #3."]
2053    MAV_COMP_ID_CAMERA3 = 102,
2054    #[doc = "Camera #4."]
2055    MAV_COMP_ID_CAMERA4 = 103,
2056    #[doc = "Camera #5."]
2057    MAV_COMP_ID_CAMERA5 = 104,
2058    #[doc = "Camera #6."]
2059    MAV_COMP_ID_CAMERA6 = 105,
2060    #[doc = "Servo #1."]
2061    MAV_COMP_ID_SERVO1 = 140,
2062    #[doc = "Servo #2."]
2063    MAV_COMP_ID_SERVO2 = 141,
2064    #[doc = "Servo #3."]
2065    MAV_COMP_ID_SERVO3 = 142,
2066    #[doc = "Servo #4."]
2067    MAV_COMP_ID_SERVO4 = 143,
2068    #[doc = "Servo #5."]
2069    MAV_COMP_ID_SERVO5 = 144,
2070    #[doc = "Servo #6."]
2071    MAV_COMP_ID_SERVO6 = 145,
2072    #[doc = "Servo #7."]
2073    MAV_COMP_ID_SERVO7 = 146,
2074    #[doc = "Servo #8."]
2075    MAV_COMP_ID_SERVO8 = 147,
2076    #[doc = "Servo #9."]
2077    MAV_COMP_ID_SERVO9 = 148,
2078    #[doc = "Servo #10."]
2079    MAV_COMP_ID_SERVO10 = 149,
2080    #[doc = "Servo #11."]
2081    MAV_COMP_ID_SERVO11 = 150,
2082    #[doc = "Servo #12."]
2083    MAV_COMP_ID_SERVO12 = 151,
2084    #[doc = "Servo #13."]
2085    MAV_COMP_ID_SERVO13 = 152,
2086    #[doc = "Servo #14."]
2087    MAV_COMP_ID_SERVO14 = 153,
2088    #[doc = "Gimbal #1."]
2089    MAV_COMP_ID_GIMBAL = 154,
2090    #[doc = "Logging component."]
2091    MAV_COMP_ID_LOG = 155,
2092    #[doc = "Automatic Dependent Surveillance-Broadcast (ADS-B) component."]
2093    MAV_COMP_ID_ADSB = 156,
2094    #[doc = "On Screen Display (OSD) devices for video links."]
2095    MAV_COMP_ID_OSD = 157,
2096    #[doc = "Generic autopilot peripheral component ID. Meant for devices that do not implement the parameter microservice."]
2097    MAV_COMP_ID_PERIPHERAL = 158,
2098    #[deprecated = "All gimbals should use MAV_COMP_ID_GIMBAL. See `MAV_COMP_ID_GIMBAL` (Deprecated since 2018-11)"]
2099    #[doc = "Gimbal ID for QX1."]
2100    MAV_COMP_ID_QX1_GIMBAL = 159,
2101    #[doc = "FLARM collision alert component."]
2102    MAV_COMP_ID_FLARM = 160,
2103    #[doc = "Parachute component."]
2104    MAV_COMP_ID_PARACHUTE = 161,
2105    #[doc = "Winch component."]
2106    MAV_COMP_ID_WINCH = 169,
2107    #[doc = "Gimbal #2."]
2108    MAV_COMP_ID_GIMBAL2 = 171,
2109    #[doc = "Gimbal #3."]
2110    MAV_COMP_ID_GIMBAL3 = 172,
2111    #[doc = "Gimbal #4"]
2112    MAV_COMP_ID_GIMBAL4 = 173,
2113    #[doc = "Gimbal #5."]
2114    MAV_COMP_ID_GIMBAL5 = 174,
2115    #[doc = "Gimbal #6."]
2116    MAV_COMP_ID_GIMBAL6 = 175,
2117    #[doc = "Battery #1."]
2118    MAV_COMP_ID_BATTERY = 180,
2119    #[doc = "Battery #2."]
2120    MAV_COMP_ID_BATTERY2 = 181,
2121    #[doc = "CAN over MAVLink client."]
2122    MAV_COMP_ID_MAVCAN = 189,
2123    #[doc = "Component that can generate/supply a mission flight plan (e.g. GCS or developer API)."]
2124    MAV_COMP_ID_MISSIONPLANNER = 190,
2125    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2126    MAV_COMP_ID_ONBOARD_COMPUTER = 191,
2127    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2128    MAV_COMP_ID_ONBOARD_COMPUTER2 = 192,
2129    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2130    MAV_COMP_ID_ONBOARD_COMPUTER3 = 193,
2131    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2132    MAV_COMP_ID_ONBOARD_COMPUTER4 = 194,
2133    #[doc = "Component that finds an optimal path between points based on a certain constraint (e.g. minimum snap, shortest path, cost, etc.)."]
2134    MAV_COMP_ID_PATHPLANNER = 195,
2135    #[doc = "Component that plans a collision free path between two points."]
2136    MAV_COMP_ID_OBSTACLE_AVOIDANCE = 196,
2137    #[doc = "Component that provides position estimates using VIO techniques."]
2138    MAV_COMP_ID_VISUAL_INERTIAL_ODOMETRY = 197,
2139    #[doc = "Component that manages pairing of vehicle and GCS."]
2140    MAV_COMP_ID_PAIRING_MANAGER = 198,
2141    #[doc = "Inertial Measurement Unit (IMU) #1."]
2142    MAV_COMP_ID_IMU = 200,
2143    #[doc = "Inertial Measurement Unit (IMU) #2."]
2144    MAV_COMP_ID_IMU_2 = 201,
2145    #[doc = "Inertial Measurement Unit (IMU) #3."]
2146    MAV_COMP_ID_IMU_3 = 202,
2147    #[doc = "GPS #1."]
2148    MAV_COMP_ID_GPS = 220,
2149    #[doc = "GPS #2."]
2150    MAV_COMP_ID_GPS2 = 221,
2151    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2152    MAV_COMP_ID_ODID_TXRX_1 = 236,
2153    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2154    MAV_COMP_ID_ODID_TXRX_2 = 237,
2155    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2156    MAV_COMP_ID_ODID_TXRX_3 = 238,
2157    #[doc = "Component to bridge MAVLink to UDP (i.e. from a UART)."]
2158    MAV_COMP_ID_UDP_BRIDGE = 240,
2159    #[doc = "Component to bridge to UART (i.e. from UDP)."]
2160    MAV_COMP_ID_UART_BRIDGE = 241,
2161    #[doc = "Component handling TUNNEL messages (e.g. vendor specific GUI of a component)."]
2162    MAV_COMP_ID_TUNNEL_NODE = 242,
2163    #[doc = "Illuminator"]
2164    MAV_COMP_ID_ILLUMINATOR = 243,
2165    #[deprecated = "System control does not require a separate component ID. Instead, system commands should be sent with target_component=MAV_COMP_ID_ALL allowing the target component to use any appropriate component id. See `MAV_COMP_ID_ALL` (Deprecated since 2018-11)"]
2166    #[doc = "Deprecated, don't use. Component for handling system messages (e.g. to ARM, takeoff, etc.)."]
2167    MAV_COMP_ID_SYSTEM_CONTROL = 250,
2168}
2169impl MavComponent {
2170    pub const DEFAULT: Self = Self::MAV_COMP_ID_ALL;
2171}
2172impl Default for MavComponent {
2173    fn default() -> Self {
2174        Self::DEFAULT
2175    }
2176}
2177#[cfg_attr(feature = "ts", derive(TS))]
2178#[cfg_attr(feature = "ts", ts(export))]
2179#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2180#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2181#[cfg_attr(feature = "serde", serde(tag = "type"))]
2182#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2183#[repr(u32)]
2184#[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-06)"]
2185#[doc = "A data stream is not a fixed set of messages, but rather a      recommendation to the autopilot software. Individual autopilots may or may not obey      the recommended messages."]
2186pub enum MavDataStream {
2187    #[doc = "Enable all data streams"]
2188    MAV_DATA_STREAM_ALL = 0,
2189    #[doc = "Enable IMU_RAW, GPS_RAW, GPS_STATUS packets."]
2190    MAV_DATA_STREAM_RAW_SENSORS = 1,
2191    #[doc = "Enable GPS_STATUS, CONTROL_STATUS, AUX_STATUS"]
2192    MAV_DATA_STREAM_EXTENDED_STATUS = 2,
2193    #[doc = "Enable RC_CHANNELS_SCALED, RC_CHANNELS_RAW, SERVO_OUTPUT_RAW"]
2194    MAV_DATA_STREAM_RC_CHANNELS = 3,
2195    #[doc = "Enable ATTITUDE_CONTROLLER_OUTPUT, POSITION_CONTROLLER_OUTPUT, NAV_CONTROLLER_OUTPUT."]
2196    MAV_DATA_STREAM_RAW_CONTROLLER = 4,
2197    #[doc = "Enable LOCAL_POSITION, GLOBAL_POSITION_INT messages."]
2198    MAV_DATA_STREAM_POSITION = 6,
2199    #[doc = "Dependent on the autopilot"]
2200    MAV_DATA_STREAM_EXTRA1 = 10,
2201    #[doc = "Dependent on the autopilot"]
2202    MAV_DATA_STREAM_EXTRA2 = 11,
2203    #[doc = "Dependent on the autopilot"]
2204    MAV_DATA_STREAM_EXTRA3 = 12,
2205}
2206impl MavDataStream {
2207    pub const DEFAULT: Self = Self::MAV_DATA_STREAM_ALL;
2208}
2209impl Default for MavDataStream {
2210    fn default() -> Self {
2211        Self::DEFAULT
2212    }
2213}
2214#[cfg_attr(feature = "ts", derive(TS))]
2215#[cfg_attr(feature = "ts", ts(export))]
2216#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2217#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2218#[cfg_attr(feature = "serde", serde(tag = "type"))]
2219#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2220#[repr(u32)]
2221#[doc = "Enumeration of distance sensor types"]
2222pub enum MavDistanceSensor {
2223    #[doc = "Laser rangefinder, e.g. LightWare SF02/F or PulsedLight units"]
2224    MAV_DISTANCE_SENSOR_LASER = 0,
2225    #[doc = "Ultrasound rangefinder, e.g. MaxBotix units"]
2226    MAV_DISTANCE_SENSOR_ULTRASOUND = 1,
2227    #[doc = "Infrared rangefinder, e.g. Sharp units"]
2228    MAV_DISTANCE_SENSOR_INFRARED = 2,
2229    #[doc = "Radar type, e.g. uLanding units"]
2230    MAV_DISTANCE_SENSOR_RADAR = 3,
2231    #[doc = "Broken or unknown type, e.g. analog units"]
2232    MAV_DISTANCE_SENSOR_UNKNOWN = 4,
2233}
2234impl MavDistanceSensor {
2235    pub const DEFAULT: Self = Self::MAV_DISTANCE_SENSOR_LASER;
2236}
2237impl Default for MavDistanceSensor {
2238    fn default() -> Self {
2239        Self::DEFAULT
2240    }
2241}
2242#[cfg_attr(feature = "ts", derive(TS))]
2243#[cfg_attr(feature = "ts", ts(export))]
2244#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2245#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2246#[cfg_attr(feature = "serde", serde(tag = "type"))]
2247#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2248#[repr(u32)]
2249#[doc = "Bitmap of options for the MAV_CMD_DO_REPOSITION"]
2250pub enum MavDoRepositionFlags {
2251    #[doc = "The aircraft should immediately transition into guided. This should not be set for follow me applications"]
2252    MAV_DO_REPOSITION_FLAGS_CHANGE_MODE = 1,
2253}
2254impl MavDoRepositionFlags {
2255    pub const DEFAULT: Self = Self::MAV_DO_REPOSITION_FLAGS_CHANGE_MODE;
2256}
2257impl Default for MavDoRepositionFlags {
2258    fn default() -> Self {
2259        Self::DEFAULT
2260    }
2261}
2262#[cfg_attr(feature = "ts", derive(TS))]
2263#[cfg_attr(feature = "ts", ts(export))]
2264#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2265#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2266#[cfg_attr(feature = "serde", serde(tag = "type"))]
2267#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2268#[repr(u32)]
2269#[doc = "Enumeration of estimator types"]
2270pub enum MavEstimatorType {
2271    #[doc = "Unknown type of the estimator."]
2272    MAV_ESTIMATOR_TYPE_UNKNOWN = 0,
2273    #[doc = "This is a naive estimator without any real covariance feedback."]
2274    MAV_ESTIMATOR_TYPE_NAIVE = 1,
2275    #[doc = "Computer vision based estimate. Might be up to scale."]
2276    MAV_ESTIMATOR_TYPE_VISION = 2,
2277    #[doc = "Visual-inertial estimate."]
2278    MAV_ESTIMATOR_TYPE_VIO = 3,
2279    #[doc = "Plain GPS estimate."]
2280    MAV_ESTIMATOR_TYPE_GPS = 4,
2281    #[doc = "Estimator integrating GPS and inertial sensing."]
2282    MAV_ESTIMATOR_TYPE_GPS_INS = 5,
2283    #[doc = "Estimate from external motion capturing system."]
2284    MAV_ESTIMATOR_TYPE_MOCAP = 6,
2285    #[doc = "Estimator based on lidar sensor input."]
2286    MAV_ESTIMATOR_TYPE_LIDAR = 7,
2287    #[doc = "Estimator on autopilot."]
2288    MAV_ESTIMATOR_TYPE_AUTOPILOT = 8,
2289}
2290impl MavEstimatorType {
2291    pub const DEFAULT: Self = Self::MAV_ESTIMATOR_TYPE_UNKNOWN;
2292}
2293impl Default for MavEstimatorType {
2294    fn default() -> Self {
2295        Self::DEFAULT
2296    }
2297}
2298#[cfg_attr(feature = "ts", derive(TS))]
2299#[cfg_attr(feature = "ts", ts(export))]
2300#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2301#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2302#[cfg_attr(feature = "serde", serde(tag = "type"))]
2303#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2304#[repr(u32)]
2305#[doc = "Flags for CURRENT_EVENT_SEQUENCE."]
2306pub enum MavEventCurrentSequenceFlags {
2307    #[doc = "A sequence reset has happened (e.g. vehicle reboot)."]
2308    MAV_EVENT_CURRENT_SEQUENCE_FLAGS_RESET = 1,
2309}
2310impl MavEventCurrentSequenceFlags {
2311    pub const DEFAULT: Self = Self::MAV_EVENT_CURRENT_SEQUENCE_FLAGS_RESET;
2312}
2313impl Default for MavEventCurrentSequenceFlags {
2314    fn default() -> Self {
2315        Self::DEFAULT
2316    }
2317}
2318#[cfg_attr(feature = "ts", derive(TS))]
2319#[cfg_attr(feature = "ts", ts(export))]
2320#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2321#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2322#[cfg_attr(feature = "serde", serde(tag = "type"))]
2323#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2324#[repr(u32)]
2325#[doc = "Reason for an event error response."]
2326pub enum MavEventErrorReason {
2327    #[doc = "The requested event is not available (anymore)."]
2328    MAV_EVENT_ERROR_REASON_UNAVAILABLE = 0,
2329}
2330impl MavEventErrorReason {
2331    pub const DEFAULT: Self = Self::MAV_EVENT_ERROR_REASON_UNAVAILABLE;
2332}
2333impl Default for MavEventErrorReason {
2334    fn default() -> Self {
2335        Self::DEFAULT
2336    }
2337}
2338#[cfg_attr(feature = "ts", derive(TS))]
2339#[cfg_attr(feature = "ts", ts(export))]
2340#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2341#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2342#[cfg_attr(feature = "serde", serde(tag = "type"))]
2343#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2344#[repr(u32)]
2345#[doc = "Coordinate frames used by MAVLink. Not all frames are supported by all commands, messages, or vehicles.        Global frames use the following naming conventions:       - \"GLOBAL\": Global coordinate frame with WGS84 latitude/longitude and altitude positive over mean sea level (MSL) by default.         The following modifiers may be used with \"GLOBAL\":         - \"RELATIVE_ALT\": Altitude is relative to the vehicle home position rather than MSL.         - \"TERRAIN_ALT\": Altitude is relative to ground level rather than MSL.         - \"INT\": Latitude/longitude (in degrees) are scaled by multiplying by 1E7.        Local frames use the following naming conventions:       - \"LOCAL\": Origin of local frame is fixed relative to earth. Unless otherwise specified this origin is the origin of the vehicle position-estimator (\"EKF\").       - \"BODY\": Origin of local frame travels with the vehicle. NOTE, \"BODY\" does NOT indicate alignment of frame axis with vehicle attitude.       - \"OFFSET\": Deprecated synonym for \"BODY\" (origin travels with the vehicle). Not to be used for new frames.        Some deprecated frames do not follow these conventions (e.g. MAV_FRAME_BODY_NED and MAV_FRAME_BODY_OFFSET_NED)."]
2346pub enum MavFrame {
2347    #[doc = "Global (WGS84) coordinate frame + altitude relative to mean sea level (MSL)."]
2348    MAV_FRAME_GLOBAL = 0,
2349    #[doc = "NED local tangent frame (x: North, y: East, z: Down) with origin fixed relative to earth."]
2350    MAV_FRAME_LOCAL_NED = 1,
2351    #[doc = "NOT a coordinate frame, indicates a mission command."]
2352    MAV_FRAME_MISSION = 2,
2353    #[doc = "Global (WGS84) coordinate frame + altitude relative to the home position."]
2354    MAV_FRAME_GLOBAL_RELATIVE_ALT = 3,
2355    #[doc = "ENU local tangent frame (x: East, y: North, z: Up) with origin fixed relative to earth."]
2356    MAV_FRAME_LOCAL_ENU = 4,
2357    #[deprecated = "Use MAV_FRAME_GLOBAL in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL` (Deprecated since 2024-03)"]
2358    #[doc = "Global (WGS84) coordinate frame (scaled) + altitude relative to mean sea level (MSL)."]
2359    MAV_FRAME_GLOBAL_INT = 5,
2360    #[deprecated = "Use MAV_FRAME_GLOBAL_RELATIVE_ALT in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL_RELATIVE_ALT` (Deprecated since 2024-03)"]
2361    #[doc = "Global (WGS84) coordinate frame (scaled) + altitude relative to the home position."]
2362    MAV_FRAME_GLOBAL_RELATIVE_ALT_INT = 6,
2363    #[doc = "NED local tangent frame (x: North, y: East, z: Down) with origin that travels with the vehicle."]
2364    MAV_FRAME_LOCAL_OFFSET_NED = 7,
2365    #[deprecated = " See `MAV_FRAME_BODY_FRD` (Deprecated since 2019-08)"]
2366    #[doc = "Same as MAV_FRAME_LOCAL_NED when used to represent position values. Same as MAV_FRAME_BODY_FRD when used with velocity/acceleration values."]
2367    MAV_FRAME_BODY_NED = 8,
2368    #[deprecated = " See `MAV_FRAME_BODY_FRD` (Deprecated since 2019-08)"]
2369    #[doc = "This is the same as MAV_FRAME_BODY_FRD."]
2370    MAV_FRAME_BODY_OFFSET_NED = 9,
2371    #[doc = "Global (WGS84) coordinate frame with AGL altitude (altitude at ground level)."]
2372    MAV_FRAME_GLOBAL_TERRAIN_ALT = 10,
2373    #[deprecated = "Use MAV_FRAME_GLOBAL_TERRAIN_ALT in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL_TERRAIN_ALT` (Deprecated since 2024-03)"]
2374    #[doc = "Global (WGS84) coordinate frame (scaled) with AGL altitude (altitude at ground level)."]
2375    MAV_FRAME_GLOBAL_TERRAIN_ALT_INT = 11,
2376    #[doc = "FRD local frame aligned to the vehicle's attitude (x: Forward, y: Right, z: Down) with an origin that travels with vehicle."]
2377    MAV_FRAME_BODY_FRD = 12,
2378    #[deprecated = "  (Deprecated since 2019-04)"]
2379    #[doc = "MAV_FRAME_BODY_FLU - Body fixed frame of reference, Z-up (x: Forward, y: Left, z: Up)."]
2380    MAV_FRAME_RESERVED_13 = 13,
2381    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2382    #[doc = "MAV_FRAME_MOCAP_NED - Odometry local coordinate frame of data given by a motion capture system, Z-down (x: North, y: East, z: Down)."]
2383    MAV_FRAME_RESERVED_14 = 14,
2384    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2385    #[doc = "MAV_FRAME_MOCAP_ENU - Odometry local coordinate frame of data given by a motion capture system, Z-up (x: East, y: North, z: Up)."]
2386    MAV_FRAME_RESERVED_15 = 15,
2387    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2388    #[doc = "MAV_FRAME_VISION_NED - Odometry local coordinate frame of data given by a vision estimation system, Z-down (x: North, y: East, z: Down)."]
2389    MAV_FRAME_RESERVED_16 = 16,
2390    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2391    #[doc = "MAV_FRAME_VISION_ENU - Odometry local coordinate frame of data given by a vision estimation system, Z-up (x: East, y: North, z: Up)."]
2392    MAV_FRAME_RESERVED_17 = 17,
2393    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2394    #[doc = "MAV_FRAME_ESTIM_NED - Odometry local coordinate frame of data given by an estimator running onboard the vehicle, Z-down (x: North, y: East, z: Down)."]
2395    MAV_FRAME_RESERVED_18 = 18,
2396    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2397    #[doc = "MAV_FRAME_ESTIM_ENU - Odometry local coordinate frame of data given by an estimator running onboard the vehicle, Z-up (x: East, y: North, z: Up)."]
2398    MAV_FRAME_RESERVED_19 = 19,
2399    #[doc = "FRD local tangent frame (x: Forward, y: Right, z: Down) with origin fixed relative to earth. The forward axis is aligned to the front of the vehicle in the horizontal plane."]
2400    MAV_FRAME_LOCAL_FRD = 20,
2401    #[doc = "FLU local tangent frame (x: Forward, y: Left, z: Up) with origin fixed relative to earth. The forward axis is aligned to the front of the vehicle in the horizontal plane."]
2402    MAV_FRAME_LOCAL_FLU = 21,
2403}
2404impl MavFrame {
2405    pub const DEFAULT: Self = Self::MAV_FRAME_GLOBAL;
2406}
2407impl Default for MavFrame {
2408    fn default() -> Self {
2409        Self::DEFAULT
2410    }
2411}
2412#[cfg_attr(feature = "ts", derive(TS))]
2413#[cfg_attr(feature = "ts", ts(export))]
2414#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2415#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2416#[cfg_attr(feature = "serde", serde(tag = "type"))]
2417#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2418#[repr(u32)]
2419#[doc = "MAV FTP error codes (<https://mavlink.io/en/services/ftp.html>)"]
2420pub enum MavFtpErr {
2421    #[doc = "None: No error"]
2422    MAV_FTP_ERR_NONE = 0,
2423    #[doc = "Fail: Unknown failure"]
2424    MAV_FTP_ERR_FAIL = 1,
2425    #[doc = "FailErrno: Command failed, Err number sent back in PayloadHeader.data[1]. \t\tThis is a file-system error number understood by the server operating system."]
2426    MAV_FTP_ERR_FAILERRNO = 2,
2427    #[doc = "InvalidDataSize: Payload size is invalid"]
2428    MAV_FTP_ERR_INVALIDDATASIZE = 3,
2429    #[doc = "InvalidSession: Session is not currently open"]
2430    MAV_FTP_ERR_INVALIDSESSION = 4,
2431    #[doc = "NoSessionsAvailable: All available sessions are already in use"]
2432    MAV_FTP_ERR_NOSESSIONSAVAILABLE = 5,
2433    #[doc = "EOF: Offset past end of file for ListDirectory and ReadFile commands"]
2434    MAV_FTP_ERR_EOF = 6,
2435    #[doc = "UnknownCommand: Unknown command / opcode"]
2436    MAV_FTP_ERR_UNKNOWNCOMMAND = 7,
2437    #[doc = "FileExists: File/directory already exists"]
2438    MAV_FTP_ERR_FILEEXISTS = 8,
2439    #[doc = "FileProtected: File/directory is write protected"]
2440    MAV_FTP_ERR_FILEPROTECTED = 9,
2441    #[doc = "FileNotFound: File/directory not found"]
2442    MAV_FTP_ERR_FILENOTFOUND = 10,
2443}
2444impl MavFtpErr {
2445    pub const DEFAULT: Self = Self::MAV_FTP_ERR_NONE;
2446}
2447impl Default for MavFtpErr {
2448    fn default() -> Self {
2449        Self::DEFAULT
2450    }
2451}
2452#[cfg_attr(feature = "ts", derive(TS))]
2453#[cfg_attr(feature = "ts", ts(export))]
2454#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2455#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2456#[cfg_attr(feature = "serde", serde(tag = "type"))]
2457#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2458#[repr(u32)]
2459#[doc = "MAV FTP opcodes: <https://mavlink.io/en/services/ftp.html>"]
2460pub enum MavFtpOpcode {
2461    #[doc = "None. Ignored, always ACKed"]
2462    MAV_FTP_OPCODE_NONE = 0,
2463    #[doc = "TerminateSession: Terminates open Read session"]
2464    MAV_FTP_OPCODE_TERMINATESESSION = 1,
2465    #[doc = "ResetSessions: Terminates all open read sessions"]
2466    MAV_FTP_OPCODE_RESETSESSION = 2,
2467    #[doc = "ListDirectory. List files and directories in path from offset"]
2468    MAV_FTP_OPCODE_LISTDIRECTORY = 3,
2469    #[doc = "OpenFileRO: Opens file at path for reading, returns session"]
2470    MAV_FTP_OPCODE_OPENFILERO = 4,
2471    #[doc = "ReadFile: Reads size bytes from offset in session"]
2472    MAV_FTP_OPCODE_READFILE = 5,
2473    #[doc = "CreateFile: Creates file at path for writing, returns session"]
2474    MAV_FTP_OPCODE_CREATEFILE = 6,
2475    #[doc = "WriteFile: Writes size bytes to offset in session"]
2476    MAV_FTP_OPCODE_WRITEFILE = 7,
2477    #[doc = "RemoveFile: Remove file at path"]
2478    MAV_FTP_OPCODE_REMOVEFILE = 8,
2479    #[doc = "CreateDirectory: Creates directory at path"]
2480    MAV_FTP_OPCODE_CREATEDIRECTORY = 9,
2481    #[doc = "RemoveDirectory: Removes directory at path. The directory must be empty."]
2482    MAV_FTP_OPCODE_REMOVEDIRECTORY = 10,
2483    #[doc = "OpenFileWO: Opens file at path for writing, returns session"]
2484    MAV_FTP_OPCODE_OPENFILEWO = 11,
2485    #[doc = "TruncateFile: Truncate file at path to offset length"]
2486    MAV_FTP_OPCODE_TRUNCATEFILE = 12,
2487    #[doc = "Rename: Rename path1 to path2"]
2488    MAV_FTP_OPCODE_RENAME = 13,
2489    #[doc = "CalcFileCRC32: Calculate CRC32 for file at path"]
2490    MAV_FTP_OPCODE_CALCFILECRC = 14,
2491    #[doc = "BurstReadFile: Burst download session file"]
2492    MAV_FTP_OPCODE_BURSTREADFILE = 15,
2493    #[doc = "ACK: ACK response"]
2494    MAV_FTP_OPCODE_ACK = 128,
2495    #[doc = "NAK: NAK response"]
2496    MAV_FTP_OPCODE_NAK = 129,
2497}
2498impl MavFtpOpcode {
2499    pub const DEFAULT: Self = Self::MAV_FTP_OPCODE_NONE;
2500}
2501impl Default for MavFtpOpcode {
2502    fn default() -> Self {
2503        Self::DEFAULT
2504    }
2505}
2506#[cfg_attr(feature = "ts", derive(TS))]
2507#[cfg_attr(feature = "ts", ts(export))]
2508#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2509#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2510#[cfg_attr(feature = "serde", serde(tag = "type"))]
2511#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2512#[repr(u32)]
2513#[doc = "Fuel types for use in FUEL_TYPE. Fuel types specify the units for the maximum, available and consumed fuel, and for the flow rates."]
2514pub enum MavFuelType {
2515    #[doc = "Not specified. Fuel levels are normalized (i.e. maximum is 1, and other levels are relative to 1)."]
2516    MAV_FUEL_TYPE_UNKNOWN = 0,
2517    #[doc = "A generic liquid fuel. Fuel levels are in millilitres (ml). Fuel rates are in millilitres/second."]
2518    MAV_FUEL_TYPE_LIQUID = 1,
2519    #[doc = "A gas tank. Fuel levels are in kilo-Pascal (kPa), and flow rates are in milliliters per second (ml/s)."]
2520    MAV_FUEL_TYPE_GAS = 2,
2521}
2522impl MavFuelType {
2523    pub const DEFAULT: Self = Self::MAV_FUEL_TYPE_UNKNOWN;
2524}
2525impl Default for MavFuelType {
2526    fn default() -> Self {
2527        Self::DEFAULT
2528    }
2529}
2530bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report status/failure cases for a power generator (used in GENERATOR_STATUS). Note that FAULTS are conditions that cause the generator to fail. Warnings are conditions that require attention before the next use (they indicate the system is not operating properly)."] pub struct MavGeneratorStatusFlag : u64 { # [doc = "Generator is off."] const MAV_GENERATOR_STATUS_FLAG_OFF = 1 ; # [doc = "Generator is ready to start generating power."] const MAV_GENERATOR_STATUS_FLAG_READY = 2 ; # [doc = "Generator is generating power."] const MAV_GENERATOR_STATUS_FLAG_GENERATING = 4 ; # [doc = "Generator is charging the batteries (generating enough power to charge and provide the load)."] const MAV_GENERATOR_STATUS_FLAG_CHARGING = 8 ; # [doc = "Generator is operating at a reduced maximum power."] const MAV_GENERATOR_STATUS_FLAG_REDUCED_POWER = 16 ; # [doc = "Generator is providing the maximum output."] const MAV_GENERATOR_STATUS_FLAG_MAXPOWER = 32 ; # [doc = "Generator is near the maximum operating temperature, cooling is insufficient."] const MAV_GENERATOR_STATUS_FLAG_OVERTEMP_WARNING = 64 ; # [doc = "Generator hit the maximum operating temperature and shutdown."] const MAV_GENERATOR_STATUS_FLAG_OVERTEMP_FAULT = 128 ; # [doc = "Power electronics are near the maximum operating temperature, cooling is insufficient."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_OVERTEMP_WARNING = 256 ; # [doc = "Power electronics hit the maximum operating temperature and shutdown."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_OVERTEMP_FAULT = 512 ; # [doc = "Power electronics experienced a fault and shutdown."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_FAULT = 1024 ; # [doc = "The power source supplying the generator failed e.g. mechanical generator stopped, tether is no longer providing power, solar cell is in shade, hydrogen reaction no longer happening."] const MAV_GENERATOR_STATUS_FLAG_POWERSOURCE_FAULT = 2048 ; # [doc = "Generator controller having communication problems."] const MAV_GENERATOR_STATUS_FLAG_COMMUNICATION_WARNING = 4096 ; # [doc = "Power electronic or generator cooling system error."] const MAV_GENERATOR_STATUS_FLAG_COOLING_WARNING = 8192 ; # [doc = "Generator controller power rail experienced a fault."] const MAV_GENERATOR_STATUS_FLAG_POWER_RAIL_FAULT = 16384 ; # [doc = "Generator controller exceeded the overcurrent threshold and shutdown to prevent damage."] const MAV_GENERATOR_STATUS_FLAG_OVERCURRENT_FAULT = 32768 ; # [doc = "Generator controller detected a high current going into the batteries and shutdown to prevent battery damage."] const MAV_GENERATOR_STATUS_FLAG_BATTERY_OVERCHARGE_CURRENT_FAULT = 65536 ; # [doc = "Generator controller exceeded it's overvoltage threshold and shutdown to prevent it exceeding the voltage rating."] const MAV_GENERATOR_STATUS_FLAG_OVERVOLTAGE_FAULT = 131072 ; # [doc = "Batteries are under voltage (generator will not start)."] const MAV_GENERATOR_STATUS_FLAG_BATTERY_UNDERVOLT_FAULT = 262144 ; # [doc = "Generator start is inhibited by e.g. a safety switch."] const MAV_GENERATOR_STATUS_FLAG_START_INHIBITED = 524288 ; # [doc = "Generator requires maintenance."] const MAV_GENERATOR_STATUS_FLAG_MAINTENANCE_REQUIRED = 1048576 ; # [doc = "Generator is not ready to generate yet."] const MAV_GENERATOR_STATUS_FLAG_WARMING_UP = 2097152 ; # [doc = "Generator is idle."] const MAV_GENERATOR_STATUS_FLAG_IDLE = 4194304 ; } }
2531impl MavGeneratorStatusFlag {
2532    pub const DEFAULT: Self = Self::MAV_GENERATOR_STATUS_FLAG_OFF;
2533}
2534impl Default for MavGeneratorStatusFlag {
2535    fn default() -> Self {
2536        Self::DEFAULT
2537    }
2538}
2539#[cfg_attr(feature = "ts", derive(TS))]
2540#[cfg_attr(feature = "ts", ts(export))]
2541#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2542#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2543#[cfg_attr(feature = "serde", serde(tag = "type"))]
2544#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2545#[repr(u32)]
2546#[doc = "Actions that may be specified in MAV_CMD_OVERRIDE_GOTO to override mission execution."]
2547pub enum MavGoto {
2548    #[doc = "Hold at the current position."]
2549    MAV_GOTO_DO_HOLD = 0,
2550    #[doc = "Continue with the next item in mission execution."]
2551    MAV_GOTO_DO_CONTINUE = 1,
2552    #[doc = "Hold at the current position of the system"]
2553    MAV_GOTO_HOLD_AT_CURRENT_POSITION = 2,
2554    #[doc = "Hold at the position specified in the parameters of the DO_HOLD action"]
2555    MAV_GOTO_HOLD_AT_SPECIFIED_POSITION = 3,
2556}
2557impl MavGoto {
2558    pub const DEFAULT: Self = Self::MAV_GOTO_DO_HOLD;
2559}
2560impl Default for MavGoto {
2561    fn default() -> Self {
2562        Self::DEFAULT
2563    }
2564}
2565#[cfg_attr(feature = "ts", derive(TS))]
2566#[cfg_attr(feature = "ts", ts(export))]
2567#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2568#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2569#[cfg_attr(feature = "serde", serde(tag = "type"))]
2570#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2571#[repr(u32)]
2572#[doc = "Enumeration of landed detector states"]
2573pub enum MavLandedState {
2574    #[doc = "MAV landed state is unknown"]
2575    MAV_LANDED_STATE_UNDEFINED = 0,
2576    #[doc = "MAV is landed (on ground)"]
2577    MAV_LANDED_STATE_ON_GROUND = 1,
2578    #[doc = "MAV is in air"]
2579    MAV_LANDED_STATE_IN_AIR = 2,
2580    #[doc = "MAV currently taking off"]
2581    MAV_LANDED_STATE_TAKEOFF = 3,
2582    #[doc = "MAV currently landing"]
2583    MAV_LANDED_STATE_LANDING = 4,
2584}
2585impl MavLandedState {
2586    pub const DEFAULT: Self = Self::MAV_LANDED_STATE_UNDEFINED;
2587}
2588impl Default for MavLandedState {
2589    fn default() -> Self {
2590        Self::DEFAULT
2591    }
2592}
2593#[cfg_attr(feature = "ts", derive(TS))]
2594#[cfg_attr(feature = "ts", ts(export))]
2595#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2596#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2597#[cfg_attr(feature = "serde", serde(tag = "type"))]
2598#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2599#[repr(u32)]
2600#[doc = "Result of mission operation (in a MISSION_ACK message)."]
2601pub enum MavMissionResult {
2602    #[doc = "mission accepted OK"]
2603    MAV_MISSION_ACCEPTED = 0,
2604    #[doc = "Generic error / not accepting mission commands at all right now."]
2605    MAV_MISSION_ERROR = 1,
2606    #[doc = "Coordinate frame is not supported."]
2607    MAV_MISSION_UNSUPPORTED_FRAME = 2,
2608    #[doc = "Command is not supported."]
2609    MAV_MISSION_UNSUPPORTED = 3,
2610    #[doc = "Mission items exceed storage space."]
2611    MAV_MISSION_NO_SPACE = 4,
2612    #[doc = "One of the parameters has an invalid value."]
2613    MAV_MISSION_INVALID = 5,
2614    #[doc = "param1 has an invalid value."]
2615    MAV_MISSION_INVALID_PARAM1 = 6,
2616    #[doc = "param2 has an invalid value."]
2617    MAV_MISSION_INVALID_PARAM2 = 7,
2618    #[doc = "param3 has an invalid value."]
2619    MAV_MISSION_INVALID_PARAM3 = 8,
2620    #[doc = "param4 has an invalid value."]
2621    MAV_MISSION_INVALID_PARAM4 = 9,
2622    #[doc = "x / param5 has an invalid value."]
2623    MAV_MISSION_INVALID_PARAM5_X = 10,
2624    #[doc = "y / param6 has an invalid value."]
2625    MAV_MISSION_INVALID_PARAM6_Y = 11,
2626    #[doc = "z / param7 has an invalid value."]
2627    MAV_MISSION_INVALID_PARAM7 = 12,
2628    #[doc = "Mission item received out of sequence"]
2629    MAV_MISSION_INVALID_SEQUENCE = 13,
2630    #[doc = "Not accepting any mission commands from this communication partner."]
2631    MAV_MISSION_DENIED = 14,
2632    #[doc = "Current mission operation cancelled (e.g. mission upload, mission download)."]
2633    MAV_MISSION_OPERATION_CANCELLED = 15,
2634}
2635impl MavMissionResult {
2636    pub const DEFAULT: Self = Self::MAV_MISSION_ACCEPTED;
2637}
2638impl Default for MavMissionResult {
2639    fn default() -> Self {
2640        Self::DEFAULT
2641    }
2642}
2643#[cfg_attr(feature = "ts", derive(TS))]
2644#[cfg_attr(feature = "ts", ts(export))]
2645#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2646#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2647#[cfg_attr(feature = "serde", serde(tag = "type"))]
2648#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2649#[repr(u32)]
2650#[doc = "Type of mission items being requested/sent in mission protocol."]
2651pub enum MavMissionType {
2652    #[doc = "Items are mission commands for main mission."]
2653    MAV_MISSION_TYPE_MISSION = 0,
2654    #[doc = "Specifies GeoFence area(s). Items are MAV_CMD_NAV_FENCE_ GeoFence items."]
2655    MAV_MISSION_TYPE_FENCE = 1,
2656    #[doc = "Specifies the rally points for the vehicle. Rally points are alternative RTL points. Items are MAV_CMD_NAV_RALLY_POINT rally point items."]
2657    MAV_MISSION_TYPE_RALLY = 2,
2658    #[doc = "Only used in MISSION_CLEAR_ALL to clear all mission types."]
2659    MAV_MISSION_TYPE_ALL = 255,
2660}
2661impl MavMissionType {
2662    pub const DEFAULT: Self = Self::MAV_MISSION_TYPE_MISSION;
2663}
2664impl Default for MavMissionType {
2665    fn default() -> Self {
2666        Self::DEFAULT
2667    }
2668}
2669#[cfg_attr(feature = "ts", derive(TS))]
2670#[cfg_attr(feature = "ts", ts(export))]
2671#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2672#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2673#[cfg_attr(feature = "serde", serde(tag = "type"))]
2674#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2675#[repr(u32)]
2676#[doc = "These defines are predefined OR-combined mode flags. There is no need to use values from this enum, but it                simplifies the use of the mode flags. Note that manual input is enabled in all modes as a safety override."]
2677pub enum MavMode {
2678    #[doc = "System is not ready to fly, booting, calibrating, etc. No flag is set."]
2679    MAV_MODE_PREFLIGHT = 0,
2680    #[doc = "System is allowed to be active, under assisted RC control."]
2681    MAV_MODE_STABILIZE_DISARMED = 80,
2682    #[doc = "System is allowed to be active, under assisted RC control."]
2683    MAV_MODE_STABILIZE_ARMED = 208,
2684    #[doc = "System is allowed to be active, under manual (RC) control, no stabilization"]
2685    MAV_MODE_MANUAL_DISARMED = 64,
2686    #[doc = "System is allowed to be active, under manual (RC) control, no stabilization"]
2687    MAV_MODE_MANUAL_ARMED = 192,
2688    #[doc = "System is allowed to be active, under autonomous control, manual setpoint"]
2689    MAV_MODE_GUIDED_DISARMED = 88,
2690    #[doc = "System is allowed to be active, under autonomous control, manual setpoint"]
2691    MAV_MODE_GUIDED_ARMED = 216,
2692    #[doc = "System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by waypoints)"]
2693    MAV_MODE_AUTO_DISARMED = 92,
2694    #[doc = "System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by waypoints)"]
2695    MAV_MODE_AUTO_ARMED = 220,
2696    #[doc = "UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only."]
2697    MAV_MODE_TEST_DISARMED = 66,
2698    #[doc = "UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only."]
2699    MAV_MODE_TEST_ARMED = 194,
2700}
2701impl MavMode {
2702    pub const DEFAULT: Self = Self::MAV_MODE_PREFLIGHT;
2703}
2704impl Default for MavMode {
2705    fn default() -> Self {
2706        Self::DEFAULT
2707    }
2708}
2709bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags encode the MAV mode."] pub struct MavModeFlag : u8 { # [doc = "0b10000000 MAV safety set to armed. Motors are enabled / running / can start. Ready to fly. Additional note: this flag is to be ignore when sent in the command MAV_CMD_DO_SET_MODE and MAV_CMD_COMPONENT_ARM_DISARM shall be used instead. The flag can still be used to report the armed state."] const MAV_MODE_FLAG_SAFETY_ARMED = 128 ; # [doc = "0b01000000 remote control input is enabled."] const MAV_MODE_FLAG_MANUAL_INPUT_ENABLED = 64 ; # [doc = "0b00100000 hardware in the loop simulation. All motors / actuators are blocked, but internal software is full operational."] const MAV_MODE_FLAG_HIL_ENABLED = 32 ; # [doc = "0b00010000 system stabilizes electronically its attitude (and optionally position). It needs however further control inputs to move around."] const MAV_MODE_FLAG_STABILIZE_ENABLED = 16 ; # [doc = "0b00001000 guided mode enabled, system flies waypoints / mission items."] const MAV_MODE_FLAG_GUIDED_ENABLED = 8 ; # [doc = "0b00000100 autonomous mode enabled, system finds its own goal positions. Guided flag can be set or not, depends on the actual implementation."] const MAV_MODE_FLAG_AUTO_ENABLED = 4 ; # [doc = "0b00000010 system has a test mode enabled. This flag is intended for temporary system tests and should not be used for stable implementations."] const MAV_MODE_FLAG_TEST_ENABLED = 2 ; # [doc = "0b00000001 Reserved for future use."] const MAV_MODE_FLAG_CUSTOM_MODE_ENABLED = 1 ; } }
2710impl MavModeFlag {
2711    pub const DEFAULT: Self = Self::MAV_MODE_FLAG_SAFETY_ARMED;
2712}
2713impl Default for MavModeFlag {
2714    fn default() -> Self {
2715        Self::DEFAULT
2716    }
2717}
2718#[cfg_attr(feature = "ts", derive(TS))]
2719#[cfg_attr(feature = "ts", ts(export))]
2720#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2721#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2722#[cfg_attr(feature = "serde", serde(tag = "type"))]
2723#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2724#[repr(u32)]
2725#[doc = "These values encode the bit positions of the decode position. These values can be used to read the value of a flag bit by combining the base_mode variable with AND with the flag position value. The result will be either 0 or 1, depending on if the flag is set or not."]
2726pub enum MavModeFlagDecodePosition {
2727    #[doc = "First bit:  10000000"]
2728    MAV_MODE_FLAG_DECODE_POSITION_SAFETY = 128,
2729    #[doc = "Second bit: 01000000"]
2730    MAV_MODE_FLAG_DECODE_POSITION_MANUAL = 64,
2731    #[doc = "Third bit:  00100000"]
2732    MAV_MODE_FLAG_DECODE_POSITION_HIL = 32,
2733    #[doc = "Fourth bit: 00010000"]
2734    MAV_MODE_FLAG_DECODE_POSITION_STABILIZE = 16,
2735    #[doc = "Fifth bit:  00001000"]
2736    MAV_MODE_FLAG_DECODE_POSITION_GUIDED = 8,
2737    #[doc = "Sixth bit:   00000100"]
2738    MAV_MODE_FLAG_DECODE_POSITION_AUTO = 4,
2739    #[doc = "Seventh bit: 00000010"]
2740    MAV_MODE_FLAG_DECODE_POSITION_TEST = 2,
2741    #[doc = "Eighth bit: 00000001"]
2742    MAV_MODE_FLAG_DECODE_POSITION_CUSTOM_MODE = 1,
2743}
2744impl MavModeFlagDecodePosition {
2745    pub const DEFAULT: Self = Self::MAV_MODE_FLAG_DECODE_POSITION_SAFETY;
2746}
2747impl Default for MavModeFlagDecodePosition {
2748    fn default() -> Self {
2749        Self::DEFAULT
2750    }
2751}
2752bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Mode properties."] pub struct MavModeProperty : u32 { # [doc = "If set, this mode is an advanced mode.           For example a rate-controlled manual mode might be advanced, whereas a position-controlled manual mode is not.           A GCS can optionally use this flag to configure the UI for its intended users."] const MAV_MODE_PROPERTY_ADVANCED = 1 ; # [doc = "If set, this mode should not be added to the list of selectable modes.           The mode might still be selected by the FC directly (for example as part of a failsafe)."] const MAV_MODE_PROPERTY_NOT_USER_SELECTABLE = 2 ; # [doc = "If set, this mode is automatically controlled (it may use but does not require a manual controller).           If unset the mode is a assumed to require user input (be a manual mode)."] const MAV_MODE_PROPERTY_AUTO_MODE = 4 ; } }
2753impl MavModeProperty {
2754    pub const DEFAULT: Self = Self::MAV_MODE_PROPERTY_ADVANCED;
2755}
2756impl Default for MavModeProperty {
2757    fn default() -> Self {
2758        Self::DEFAULT
2759    }
2760}
2761#[cfg_attr(feature = "ts", derive(TS))]
2762#[cfg_attr(feature = "ts", ts(export))]
2763#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2764#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2765#[cfg_attr(feature = "serde", serde(tag = "type"))]
2766#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2767#[repr(u32)]
2768#[deprecated = " See `GIMBAL_MANAGER_FLAGS` (Deprecated since 2020-01)"]
2769#[doc = "Enumeration of possible mount operation modes. This message is used by obsolete/deprecated gimbal messages."]
2770pub enum MavMountMode {
2771    #[doc = "Load and keep safe position (Roll,Pitch,Yaw) from permanent memory and stop stabilization"]
2772    MAV_MOUNT_MODE_RETRACT = 0,
2773    #[doc = "Load and keep neutral position (Roll,Pitch,Yaw) from permanent memory."]
2774    MAV_MOUNT_MODE_NEUTRAL = 1,
2775    #[doc = "Load neutral position and start MAVLink Roll,Pitch,Yaw control with stabilization"]
2776    MAV_MOUNT_MODE_MAVLINK_TARGETING = 2,
2777    #[doc = "Load neutral position and start RC Roll,Pitch,Yaw control with stabilization"]
2778    MAV_MOUNT_MODE_RC_TARGETING = 3,
2779    #[doc = "Load neutral position and start to point to Lat,Lon,Alt"]
2780    MAV_MOUNT_MODE_GPS_POINT = 4,
2781    #[doc = "Gimbal tracks system with specified system ID"]
2782    MAV_MOUNT_MODE_SYSID_TARGET = 5,
2783    #[doc = "Gimbal tracks home position"]
2784    MAV_MOUNT_MODE_HOME_LOCATION = 6,
2785}
2786impl MavMountMode {
2787    pub const DEFAULT: Self = Self::MAV_MOUNT_MODE_RETRACT;
2788}
2789impl Default for MavMountMode {
2790    fn default() -> Self {
2791        Self::DEFAULT
2792    }
2793}
2794#[cfg_attr(feature = "ts", derive(TS))]
2795#[cfg_attr(feature = "ts", ts(export))]
2796#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2797#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2798#[cfg_attr(feature = "serde", serde(tag = "type"))]
2799#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2800#[repr(u32)]
2801pub enum MavOdidArmStatus {
2802    #[doc = "Passing arming checks."]
2803    MAV_ODID_ARM_STATUS_GOOD_TO_ARM = 0,
2804    #[doc = "Generic arming failure, see error string for details."]
2805    MAV_ODID_ARM_STATUS_PRE_ARM_FAIL_GENERIC = 1,
2806}
2807impl MavOdidArmStatus {
2808    pub const DEFAULT: Self = Self::MAV_ODID_ARM_STATUS_GOOD_TO_ARM;
2809}
2810impl Default for MavOdidArmStatus {
2811    fn default() -> Self {
2812        Self::DEFAULT
2813    }
2814}
2815#[cfg_attr(feature = "ts", derive(TS))]
2816#[cfg_attr(feature = "ts", ts(export))]
2817#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2818#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2819#[cfg_attr(feature = "serde", serde(tag = "type"))]
2820#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2821#[repr(u32)]
2822pub enum MavOdidAuthType {
2823    #[doc = "No authentication type is specified."]
2824    MAV_ODID_AUTH_TYPE_NONE = 0,
2825    #[doc = "Signature for the UAS (Unmanned Aircraft System) ID."]
2826    MAV_ODID_AUTH_TYPE_UAS_ID_SIGNATURE = 1,
2827    #[doc = "Signature for the Operator ID."]
2828    MAV_ODID_AUTH_TYPE_OPERATOR_ID_SIGNATURE = 2,
2829    #[doc = "Signature for the entire message set."]
2830    MAV_ODID_AUTH_TYPE_MESSAGE_SET_SIGNATURE = 3,
2831    #[doc = "Authentication is provided by Network Remote ID."]
2832    MAV_ODID_AUTH_TYPE_NETWORK_REMOTE_ID = 4,
2833    #[doc = "The exact authentication type is indicated by the first byte of authentication_data and these type values are managed by ICAO."]
2834    MAV_ODID_AUTH_TYPE_SPECIFIC_AUTHENTICATION = 5,
2835}
2836impl MavOdidAuthType {
2837    pub const DEFAULT: Self = Self::MAV_ODID_AUTH_TYPE_NONE;
2838}
2839impl Default for MavOdidAuthType {
2840    fn default() -> Self {
2841        Self::DEFAULT
2842    }
2843}
2844#[cfg_attr(feature = "ts", derive(TS))]
2845#[cfg_attr(feature = "ts", ts(export))]
2846#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2847#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2848#[cfg_attr(feature = "serde", serde(tag = "type"))]
2849#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2850#[repr(u32)]
2851pub enum MavOdidCategoryEu {
2852    #[doc = "The category for the UA, according to the EU specification, is undeclared."]
2853    MAV_ODID_CATEGORY_EU_UNDECLARED = 0,
2854    #[doc = "The category for the UA, according to the EU specification, is the Open category."]
2855    MAV_ODID_CATEGORY_EU_OPEN = 1,
2856    #[doc = "The category for the UA, according to the EU specification, is the Specific category."]
2857    MAV_ODID_CATEGORY_EU_SPECIFIC = 2,
2858    #[doc = "The category for the UA, according to the EU specification, is the Certified category."]
2859    MAV_ODID_CATEGORY_EU_CERTIFIED = 3,
2860}
2861impl MavOdidCategoryEu {
2862    pub const DEFAULT: Self = Self::MAV_ODID_CATEGORY_EU_UNDECLARED;
2863}
2864impl Default for MavOdidCategoryEu {
2865    fn default() -> Self {
2866        Self::DEFAULT
2867    }
2868}
2869#[cfg_attr(feature = "ts", derive(TS))]
2870#[cfg_attr(feature = "ts", ts(export))]
2871#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2872#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2873#[cfg_attr(feature = "serde", serde(tag = "type"))]
2874#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2875#[repr(u32)]
2876pub enum MavOdidClassEu {
2877    #[doc = "The class for the UA, according to the EU specification, is undeclared."]
2878    MAV_ODID_CLASS_EU_UNDECLARED = 0,
2879    #[doc = "The class for the UA, according to the EU specification, is Class 0."]
2880    MAV_ODID_CLASS_EU_CLASS_0 = 1,
2881    #[doc = "The class for the UA, according to the EU specification, is Class 1."]
2882    MAV_ODID_CLASS_EU_CLASS_1 = 2,
2883    #[doc = "The class for the UA, according to the EU specification, is Class 2."]
2884    MAV_ODID_CLASS_EU_CLASS_2 = 3,
2885    #[doc = "The class for the UA, according to the EU specification, is Class 3."]
2886    MAV_ODID_CLASS_EU_CLASS_3 = 4,
2887    #[doc = "The class for the UA, according to the EU specification, is Class 4."]
2888    MAV_ODID_CLASS_EU_CLASS_4 = 5,
2889    #[doc = "The class for the UA, according to the EU specification, is Class 5."]
2890    MAV_ODID_CLASS_EU_CLASS_5 = 6,
2891    #[doc = "The class for the UA, according to the EU specification, is Class 6."]
2892    MAV_ODID_CLASS_EU_CLASS_6 = 7,
2893}
2894impl MavOdidClassEu {
2895    pub const DEFAULT: Self = Self::MAV_ODID_CLASS_EU_UNDECLARED;
2896}
2897impl Default for MavOdidClassEu {
2898    fn default() -> Self {
2899        Self::DEFAULT
2900    }
2901}
2902#[cfg_attr(feature = "ts", derive(TS))]
2903#[cfg_attr(feature = "ts", ts(export))]
2904#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2905#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2906#[cfg_attr(feature = "serde", serde(tag = "type"))]
2907#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2908#[repr(u32)]
2909pub enum MavOdidClassificationType {
2910    #[doc = "The classification type for the UA is undeclared."]
2911    MAV_ODID_CLASSIFICATION_TYPE_UNDECLARED = 0,
2912    #[doc = "The classification type for the UA follows EU (European Union) specifications."]
2913    MAV_ODID_CLASSIFICATION_TYPE_EU = 1,
2914}
2915impl MavOdidClassificationType {
2916    pub const DEFAULT: Self = Self::MAV_ODID_CLASSIFICATION_TYPE_UNDECLARED;
2917}
2918impl Default for MavOdidClassificationType {
2919    fn default() -> Self {
2920        Self::DEFAULT
2921    }
2922}
2923#[cfg_attr(feature = "ts", derive(TS))]
2924#[cfg_attr(feature = "ts", ts(export))]
2925#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2926#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2927#[cfg_attr(feature = "serde", serde(tag = "type"))]
2928#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2929#[repr(u32)]
2930pub enum MavOdidDescType {
2931    #[doc = "Optional free-form text description of the purpose of the flight."]
2932    MAV_ODID_DESC_TYPE_TEXT = 0,
2933    #[doc = "Optional additional clarification when status == MAV_ODID_STATUS_EMERGENCY."]
2934    MAV_ODID_DESC_TYPE_EMERGENCY = 1,
2935    #[doc = "Optional additional clarification when status != MAV_ODID_STATUS_EMERGENCY."]
2936    MAV_ODID_DESC_TYPE_EXTENDED_STATUS = 2,
2937}
2938impl MavOdidDescType {
2939    pub const DEFAULT: Self = Self::MAV_ODID_DESC_TYPE_TEXT;
2940}
2941impl Default for MavOdidDescType {
2942    fn default() -> Self {
2943        Self::DEFAULT
2944    }
2945}
2946#[cfg_attr(feature = "ts", derive(TS))]
2947#[cfg_attr(feature = "ts", ts(export))]
2948#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2949#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2950#[cfg_attr(feature = "serde", serde(tag = "type"))]
2951#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2952#[repr(u32)]
2953pub enum MavOdidHeightRef {
2954    #[doc = "The height field is relative to the take-off location."]
2955    MAV_ODID_HEIGHT_REF_OVER_TAKEOFF = 0,
2956    #[doc = "The height field is relative to ground."]
2957    MAV_ODID_HEIGHT_REF_OVER_GROUND = 1,
2958}
2959impl MavOdidHeightRef {
2960    pub const DEFAULT: Self = Self::MAV_ODID_HEIGHT_REF_OVER_TAKEOFF;
2961}
2962impl Default for MavOdidHeightRef {
2963    fn default() -> Self {
2964        Self::DEFAULT
2965    }
2966}
2967#[cfg_attr(feature = "ts", derive(TS))]
2968#[cfg_attr(feature = "ts", ts(export))]
2969#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2970#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2971#[cfg_attr(feature = "serde", serde(tag = "type"))]
2972#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2973#[repr(u32)]
2974pub enum MavOdidHorAcc {
2975    #[doc = "The horizontal accuracy is unknown."]
2976    MAV_ODID_HOR_ACC_UNKNOWN = 0,
2977    #[doc = "The horizontal accuracy is smaller than 10 Nautical Miles. 18.52 km."]
2978    MAV_ODID_HOR_ACC_10NM = 1,
2979    #[doc = "The horizontal accuracy is smaller than 4 Nautical Miles. 7.408 km."]
2980    MAV_ODID_HOR_ACC_4NM = 2,
2981    #[doc = "The horizontal accuracy is smaller than 2 Nautical Miles. 3.704 km."]
2982    MAV_ODID_HOR_ACC_2NM = 3,
2983    #[doc = "The horizontal accuracy is smaller than 1 Nautical Miles. 1.852 km."]
2984    MAV_ODID_HOR_ACC_1NM = 4,
2985    #[doc = "The horizontal accuracy is smaller than 0.5 Nautical Miles. 926 m."]
2986    MAV_ODID_HOR_ACC_0_5NM = 5,
2987    #[doc = "The horizontal accuracy is smaller than 0.3 Nautical Miles. 555.6 m."]
2988    MAV_ODID_HOR_ACC_0_3NM = 6,
2989    #[doc = "The horizontal accuracy is smaller than 0.1 Nautical Miles. 185.2 m."]
2990    MAV_ODID_HOR_ACC_0_1NM = 7,
2991    #[doc = "The horizontal accuracy is smaller than 0.05 Nautical Miles. 92.6 m."]
2992    MAV_ODID_HOR_ACC_0_05NM = 8,
2993    #[doc = "The horizontal accuracy is smaller than 30 meter."]
2994    MAV_ODID_HOR_ACC_30_METER = 9,
2995    #[doc = "The horizontal accuracy is smaller than 10 meter."]
2996    MAV_ODID_HOR_ACC_10_METER = 10,
2997    #[doc = "The horizontal accuracy is smaller than 3 meter."]
2998    MAV_ODID_HOR_ACC_3_METER = 11,
2999    #[doc = "The horizontal accuracy is smaller than 1 meter."]
3000    MAV_ODID_HOR_ACC_1_METER = 12,
3001}
3002impl MavOdidHorAcc {
3003    pub const DEFAULT: Self = Self::MAV_ODID_HOR_ACC_UNKNOWN;
3004}
3005impl Default for MavOdidHorAcc {
3006    fn default() -> Self {
3007        Self::DEFAULT
3008    }
3009}
3010#[cfg_attr(feature = "ts", derive(TS))]
3011#[cfg_attr(feature = "ts", ts(export))]
3012#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3013#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3014#[cfg_attr(feature = "serde", serde(tag = "type"))]
3015#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3016#[repr(u32)]
3017pub enum MavOdidIdType {
3018    #[doc = "No type defined."]
3019    MAV_ODID_ID_TYPE_NONE = 0,
3020    #[doc = "Manufacturer Serial Number (ANSI/CTA-2063 format)."]
3021    MAV_ODID_ID_TYPE_SERIAL_NUMBER = 1,
3022    #[doc = "CAA (Civil Aviation Authority) registered ID. Format: [ICAO Country Code].[CAA Assigned ID]."]
3023    MAV_ODID_ID_TYPE_CAA_REGISTRATION_ID = 2,
3024    #[doc = "UTM (Unmanned Traffic Management) assigned UUID (RFC4122)."]
3025    MAV_ODID_ID_TYPE_UTM_ASSIGNED_UUID = 3,
3026    #[doc = "A 20 byte ID for a specific flight/session. The exact ID type is indicated by the first byte of uas_id and these type values are managed by ICAO."]
3027    MAV_ODID_ID_TYPE_SPECIFIC_SESSION_ID = 4,
3028}
3029impl MavOdidIdType {
3030    pub const DEFAULT: Self = Self::MAV_ODID_ID_TYPE_NONE;
3031}
3032impl Default for MavOdidIdType {
3033    fn default() -> Self {
3034        Self::DEFAULT
3035    }
3036}
3037#[cfg_attr(feature = "ts", derive(TS))]
3038#[cfg_attr(feature = "ts", ts(export))]
3039#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3040#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3041#[cfg_attr(feature = "serde", serde(tag = "type"))]
3042#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3043#[repr(u32)]
3044pub enum MavOdidOperatorIdType {
3045    #[doc = "CAA (Civil Aviation Authority) registered operator ID."]
3046    MAV_ODID_OPERATOR_ID_TYPE_CAA = 0,
3047}
3048impl MavOdidOperatorIdType {
3049    pub const DEFAULT: Self = Self::MAV_ODID_OPERATOR_ID_TYPE_CAA;
3050}
3051impl Default for MavOdidOperatorIdType {
3052    fn default() -> Self {
3053        Self::DEFAULT
3054    }
3055}
3056#[cfg_attr(feature = "ts", derive(TS))]
3057#[cfg_attr(feature = "ts", ts(export))]
3058#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3059#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3060#[cfg_attr(feature = "serde", serde(tag = "type"))]
3061#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3062#[repr(u32)]
3063pub enum MavOdidOperatorLocationType {
3064    #[doc = "The location/altitude of the operator is the same as the take-off location."]
3065    MAV_ODID_OPERATOR_LOCATION_TYPE_TAKEOFF = 0,
3066    #[doc = "The location/altitude of the operator is dynamic. E.g. based on live GNSS data."]
3067    MAV_ODID_OPERATOR_LOCATION_TYPE_LIVE_GNSS = 1,
3068    #[doc = "The location/altitude of the operator are fixed values."]
3069    MAV_ODID_OPERATOR_LOCATION_TYPE_FIXED = 2,
3070}
3071impl MavOdidOperatorLocationType {
3072    pub const DEFAULT: Self = Self::MAV_ODID_OPERATOR_LOCATION_TYPE_TAKEOFF;
3073}
3074impl Default for MavOdidOperatorLocationType {
3075    fn default() -> Self {
3076        Self::DEFAULT
3077    }
3078}
3079#[cfg_attr(feature = "ts", derive(TS))]
3080#[cfg_attr(feature = "ts", ts(export))]
3081#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3082#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3083#[cfg_attr(feature = "serde", serde(tag = "type"))]
3084#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3085#[repr(u32)]
3086pub enum MavOdidSpeedAcc {
3087    #[doc = "The speed accuracy is unknown."]
3088    MAV_ODID_SPEED_ACC_UNKNOWN = 0,
3089    #[doc = "The speed accuracy is smaller than 10 meters per second."]
3090    MAV_ODID_SPEED_ACC_10_METERS_PER_SECOND = 1,
3091    #[doc = "The speed accuracy is smaller than 3 meters per second."]
3092    MAV_ODID_SPEED_ACC_3_METERS_PER_SECOND = 2,
3093    #[doc = "The speed accuracy is smaller than 1 meters per second."]
3094    MAV_ODID_SPEED_ACC_1_METERS_PER_SECOND = 3,
3095    #[doc = "The speed accuracy is smaller than 0.3 meters per second."]
3096    MAV_ODID_SPEED_ACC_0_3_METERS_PER_SECOND = 4,
3097}
3098impl MavOdidSpeedAcc {
3099    pub const DEFAULT: Self = Self::MAV_ODID_SPEED_ACC_UNKNOWN;
3100}
3101impl Default for MavOdidSpeedAcc {
3102    fn default() -> Self {
3103        Self::DEFAULT
3104    }
3105}
3106#[cfg_attr(feature = "ts", derive(TS))]
3107#[cfg_attr(feature = "ts", ts(export))]
3108#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3109#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3110#[cfg_attr(feature = "serde", serde(tag = "type"))]
3111#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3112#[repr(u32)]
3113pub enum MavOdidStatus {
3114    #[doc = "The status of the (UA) Unmanned Aircraft is undefined."]
3115    MAV_ODID_STATUS_UNDECLARED = 0,
3116    #[doc = "The UA is on the ground."]
3117    MAV_ODID_STATUS_GROUND = 1,
3118    #[doc = "The UA is in the air."]
3119    MAV_ODID_STATUS_AIRBORNE = 2,
3120    #[doc = "The UA is having an emergency."]
3121    MAV_ODID_STATUS_EMERGENCY = 3,
3122    #[doc = "The remote ID system is failing or unreliable in some way."]
3123    MAV_ODID_STATUS_REMOTE_ID_SYSTEM_FAILURE = 4,
3124}
3125impl MavOdidStatus {
3126    pub const DEFAULT: Self = Self::MAV_ODID_STATUS_UNDECLARED;
3127}
3128impl Default for MavOdidStatus {
3129    fn default() -> Self {
3130        Self::DEFAULT
3131    }
3132}
3133#[cfg_attr(feature = "ts", derive(TS))]
3134#[cfg_attr(feature = "ts", ts(export))]
3135#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3136#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3137#[cfg_attr(feature = "serde", serde(tag = "type"))]
3138#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3139#[repr(u32)]
3140pub enum MavOdidTimeAcc {
3141    #[doc = "The timestamp accuracy is unknown."]
3142    MAV_ODID_TIME_ACC_UNKNOWN = 0,
3143    #[doc = "The timestamp accuracy is smaller than or equal to 0.1 second."]
3144    MAV_ODID_TIME_ACC_0_1_SECOND = 1,
3145    #[doc = "The timestamp accuracy is smaller than or equal to 0.2 second."]
3146    MAV_ODID_TIME_ACC_0_2_SECOND = 2,
3147    #[doc = "The timestamp accuracy is smaller than or equal to 0.3 second."]
3148    MAV_ODID_TIME_ACC_0_3_SECOND = 3,
3149    #[doc = "The timestamp accuracy is smaller than or equal to 0.4 second."]
3150    MAV_ODID_TIME_ACC_0_4_SECOND = 4,
3151    #[doc = "The timestamp accuracy is smaller than or equal to 0.5 second."]
3152    MAV_ODID_TIME_ACC_0_5_SECOND = 5,
3153    #[doc = "The timestamp accuracy is smaller than or equal to 0.6 second."]
3154    MAV_ODID_TIME_ACC_0_6_SECOND = 6,
3155    #[doc = "The timestamp accuracy is smaller than or equal to 0.7 second."]
3156    MAV_ODID_TIME_ACC_0_7_SECOND = 7,
3157    #[doc = "The timestamp accuracy is smaller than or equal to 0.8 second."]
3158    MAV_ODID_TIME_ACC_0_8_SECOND = 8,
3159    #[doc = "The timestamp accuracy is smaller than or equal to 0.9 second."]
3160    MAV_ODID_TIME_ACC_0_9_SECOND = 9,
3161    #[doc = "The timestamp accuracy is smaller than or equal to 1.0 second."]
3162    MAV_ODID_TIME_ACC_1_0_SECOND = 10,
3163    #[doc = "The timestamp accuracy is smaller than or equal to 1.1 second."]
3164    MAV_ODID_TIME_ACC_1_1_SECOND = 11,
3165    #[doc = "The timestamp accuracy is smaller than or equal to 1.2 second."]
3166    MAV_ODID_TIME_ACC_1_2_SECOND = 12,
3167    #[doc = "The timestamp accuracy is smaller than or equal to 1.3 second."]
3168    MAV_ODID_TIME_ACC_1_3_SECOND = 13,
3169    #[doc = "The timestamp accuracy is smaller than or equal to 1.4 second."]
3170    MAV_ODID_TIME_ACC_1_4_SECOND = 14,
3171    #[doc = "The timestamp accuracy is smaller than or equal to 1.5 second."]
3172    MAV_ODID_TIME_ACC_1_5_SECOND = 15,
3173}
3174impl MavOdidTimeAcc {
3175    pub const DEFAULT: Self = Self::MAV_ODID_TIME_ACC_UNKNOWN;
3176}
3177impl Default for MavOdidTimeAcc {
3178    fn default() -> Self {
3179        Self::DEFAULT
3180    }
3181}
3182#[cfg_attr(feature = "ts", derive(TS))]
3183#[cfg_attr(feature = "ts", ts(export))]
3184#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3185#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3186#[cfg_attr(feature = "serde", serde(tag = "type"))]
3187#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3188#[repr(u32)]
3189pub enum MavOdidUaType {
3190    #[doc = "No UA (Unmanned Aircraft) type defined."]
3191    MAV_ODID_UA_TYPE_NONE = 0,
3192    #[doc = "Aeroplane/Airplane. Fixed wing."]
3193    MAV_ODID_UA_TYPE_AEROPLANE = 1,
3194    #[doc = "Helicopter or multirotor."]
3195    MAV_ODID_UA_TYPE_HELICOPTER_OR_MULTIROTOR = 2,
3196    #[doc = "Gyroplane."]
3197    MAV_ODID_UA_TYPE_GYROPLANE = 3,
3198    #[doc = "VTOL (Vertical Take-Off and Landing). Fixed wing aircraft that can take off vertically."]
3199    MAV_ODID_UA_TYPE_HYBRID_LIFT = 4,
3200    #[doc = "Ornithopter."]
3201    MAV_ODID_UA_TYPE_ORNITHOPTER = 5,
3202    #[doc = "Glider."]
3203    MAV_ODID_UA_TYPE_GLIDER = 6,
3204    #[doc = "Kite."]
3205    MAV_ODID_UA_TYPE_KITE = 7,
3206    #[doc = "Free Balloon."]
3207    MAV_ODID_UA_TYPE_FREE_BALLOON = 8,
3208    #[doc = "Captive Balloon."]
3209    MAV_ODID_UA_TYPE_CAPTIVE_BALLOON = 9,
3210    #[doc = "Airship. E.g. a blimp."]
3211    MAV_ODID_UA_TYPE_AIRSHIP = 10,
3212    #[doc = "Free Fall/Parachute (unpowered)."]
3213    MAV_ODID_UA_TYPE_FREE_FALL_PARACHUTE = 11,
3214    #[doc = "Rocket."]
3215    MAV_ODID_UA_TYPE_ROCKET = 12,
3216    #[doc = "Tethered powered aircraft."]
3217    MAV_ODID_UA_TYPE_TETHERED_POWERED_AIRCRAFT = 13,
3218    #[doc = "Ground Obstacle."]
3219    MAV_ODID_UA_TYPE_GROUND_OBSTACLE = 14,
3220    #[doc = "Other type of aircraft not listed earlier."]
3221    MAV_ODID_UA_TYPE_OTHER = 15,
3222}
3223impl MavOdidUaType {
3224    pub const DEFAULT: Self = Self::MAV_ODID_UA_TYPE_NONE;
3225}
3226impl Default for MavOdidUaType {
3227    fn default() -> Self {
3228        Self::DEFAULT
3229    }
3230}
3231#[cfg_attr(feature = "ts", derive(TS))]
3232#[cfg_attr(feature = "ts", ts(export))]
3233#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3234#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3235#[cfg_attr(feature = "serde", serde(tag = "type"))]
3236#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3237#[repr(u32)]
3238pub enum MavOdidVerAcc {
3239    #[doc = "The vertical accuracy is unknown."]
3240    MAV_ODID_VER_ACC_UNKNOWN = 0,
3241    #[doc = "The vertical accuracy is smaller than 150 meter."]
3242    MAV_ODID_VER_ACC_150_METER = 1,
3243    #[doc = "The vertical accuracy is smaller than 45 meter."]
3244    MAV_ODID_VER_ACC_45_METER = 2,
3245    #[doc = "The vertical accuracy is smaller than 25 meter."]
3246    MAV_ODID_VER_ACC_25_METER = 3,
3247    #[doc = "The vertical accuracy is smaller than 10 meter."]
3248    MAV_ODID_VER_ACC_10_METER = 4,
3249    #[doc = "The vertical accuracy is smaller than 3 meter."]
3250    MAV_ODID_VER_ACC_3_METER = 5,
3251    #[doc = "The vertical accuracy is smaller than 1 meter."]
3252    MAV_ODID_VER_ACC_1_METER = 6,
3253}
3254impl MavOdidVerAcc {
3255    pub const DEFAULT: Self = Self::MAV_ODID_VER_ACC_UNKNOWN;
3256}
3257impl Default for MavOdidVerAcc {
3258    fn default() -> Self {
3259        Self::DEFAULT
3260    }
3261}
3262#[cfg_attr(feature = "ts", derive(TS))]
3263#[cfg_attr(feature = "ts", ts(export))]
3264#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3265#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3266#[cfg_attr(feature = "serde", serde(tag = "type"))]
3267#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3268#[repr(u32)]
3269#[doc = "Specifies the datatype of a MAVLink extended parameter."]
3270pub enum MavParamExtType {
3271    #[doc = "8-bit unsigned integer"]
3272    MAV_PARAM_EXT_TYPE_UINT8 = 1,
3273    #[doc = "8-bit signed integer"]
3274    MAV_PARAM_EXT_TYPE_INT8 = 2,
3275    #[doc = "16-bit unsigned integer"]
3276    MAV_PARAM_EXT_TYPE_UINT16 = 3,
3277    #[doc = "16-bit signed integer"]
3278    MAV_PARAM_EXT_TYPE_INT16 = 4,
3279    #[doc = "32-bit unsigned integer"]
3280    MAV_PARAM_EXT_TYPE_UINT32 = 5,
3281    #[doc = "32-bit signed integer"]
3282    MAV_PARAM_EXT_TYPE_INT32 = 6,
3283    #[doc = "64-bit unsigned integer"]
3284    MAV_PARAM_EXT_TYPE_UINT64 = 7,
3285    #[doc = "64-bit signed integer"]
3286    MAV_PARAM_EXT_TYPE_INT64 = 8,
3287    #[doc = "32-bit floating-point"]
3288    MAV_PARAM_EXT_TYPE_REAL32 = 9,
3289    #[doc = "64-bit floating-point"]
3290    MAV_PARAM_EXT_TYPE_REAL64 = 10,
3291    #[doc = "Custom Type"]
3292    MAV_PARAM_EXT_TYPE_CUSTOM = 11,
3293}
3294impl MavParamExtType {
3295    pub const DEFAULT: Self = Self::MAV_PARAM_EXT_TYPE_UINT8;
3296}
3297impl Default for MavParamExtType {
3298    fn default() -> Self {
3299        Self::DEFAULT
3300    }
3301}
3302#[cfg_attr(feature = "ts", derive(TS))]
3303#[cfg_attr(feature = "ts", ts(export))]
3304#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3305#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3306#[cfg_attr(feature = "serde", serde(tag = "type"))]
3307#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3308#[repr(u32)]
3309#[doc = "Specifies the datatype of a MAVLink parameter."]
3310pub enum MavParamType {
3311    #[doc = "8-bit unsigned integer"]
3312    MAV_PARAM_TYPE_UINT8 = 1,
3313    #[doc = "8-bit signed integer"]
3314    MAV_PARAM_TYPE_INT8 = 2,
3315    #[doc = "16-bit unsigned integer"]
3316    MAV_PARAM_TYPE_UINT16 = 3,
3317    #[doc = "16-bit signed integer"]
3318    MAV_PARAM_TYPE_INT16 = 4,
3319    #[doc = "32-bit unsigned integer"]
3320    MAV_PARAM_TYPE_UINT32 = 5,
3321    #[doc = "32-bit signed integer"]
3322    MAV_PARAM_TYPE_INT32 = 6,
3323    #[doc = "64-bit unsigned integer"]
3324    MAV_PARAM_TYPE_UINT64 = 7,
3325    #[doc = "64-bit signed integer"]
3326    MAV_PARAM_TYPE_INT64 = 8,
3327    #[doc = "32-bit floating-point"]
3328    MAV_PARAM_TYPE_REAL32 = 9,
3329    #[doc = "64-bit floating-point"]
3330    MAV_PARAM_TYPE_REAL64 = 10,
3331}
3332impl MavParamType {
3333    pub const DEFAULT: Self = Self::MAV_PARAM_TYPE_UINT8;
3334}
3335impl Default for MavParamType {
3336    fn default() -> Self {
3337        Self::DEFAULT
3338    }
3339}
3340bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Power supply status flags (bitmask)"] pub struct MavPowerStatus : u16 { # [doc = "main brick power supply valid"] const MAV_POWER_STATUS_BRICK_VALID = 1 ; # [doc = "main servo power supply valid for FMU"] const MAV_POWER_STATUS_SERVO_VALID = 2 ; # [doc = "USB power is connected"] const MAV_POWER_STATUS_USB_CONNECTED = 4 ; # [doc = "peripheral supply is in over-current state"] const MAV_POWER_STATUS_PERIPH_OVERCURRENT = 8 ; # [doc = "hi-power peripheral supply is in over-current state"] const MAV_POWER_STATUS_PERIPH_HIPOWER_OVERCURRENT = 16 ; # [doc = "Power status has changed since boot"] const MAV_POWER_STATUS_CHANGED = 32 ; } }
3341impl MavPowerStatus {
3342    pub const DEFAULT: Self = Self::MAV_POWER_STATUS_BRICK_VALID;
3343}
3344impl Default for MavPowerStatus {
3345    fn default() -> Self {
3346        Self::DEFAULT
3347    }
3348}
3349bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmask of (optional) autopilot capabilities (64 bit). If a bit is set, the autopilot supports this capability."] pub struct MavProtocolCapability : u64 { # [doc = "Autopilot supports the MISSION_ITEM float message type.           Note that MISSION_ITEM is deprecated, and autopilots should use MISSION_INT instead."] const MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT = 1 ; # [deprecated = " See `MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST` (Deprecated since 2022-03)"] # [doc = "Autopilot supports the new param float message type."] const MAV_PROTOCOL_CAPABILITY_PARAM_FLOAT = 2 ; # [doc = "Autopilot supports MISSION_ITEM_INT scaled integer message type.           Note that this flag must always be set if missions are supported, because missions must always use MISSION_ITEM_INT (rather than MISSION_ITEM, which is deprecated)."] const MAV_PROTOCOL_CAPABILITY_MISSION_INT = 4 ; # [doc = "Autopilot supports COMMAND_INT scaled integer message type."] const MAV_PROTOCOL_CAPABILITY_COMMAND_INT = 8 ; # [doc = "Parameter protocol uses byte-wise encoding of parameter values into param_value (float) fields: <https://mavlink.io/en/services/parameter.html#parameter-encoding>.           Note that either this flag or MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST should be set if the parameter protocol is supported."] const MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE = 16 ; # [doc = "Autopilot supports the File Transfer Protocol v1: <https://mavlink.io/en/services/ftp.html>."] const MAV_PROTOCOL_CAPABILITY_FTP = 32 ; # [doc = "Autopilot supports commanding attitude offboard."] const MAV_PROTOCOL_CAPABILITY_SET_ATTITUDE_TARGET = 64 ; # [doc = "Autopilot supports commanding position and velocity targets in local NED frame."] const MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_LOCAL_NED = 128 ; # [doc = "Autopilot supports commanding position and velocity targets in global scaled integers."] const MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_GLOBAL_INT = 256 ; # [doc = "Autopilot supports terrain protocol / data handling."] const MAV_PROTOCOL_CAPABILITY_TERRAIN = 512 ; # [doc = "Reserved for future use."] const MAV_PROTOCOL_CAPABILITY_RESERVED3 = 1024 ; # [doc = "Autopilot supports the MAV_CMD_DO_FLIGHTTERMINATION command (flight termination)."] const MAV_PROTOCOL_CAPABILITY_FLIGHT_TERMINATION = 2048 ; # [doc = "Autopilot supports onboard compass calibration."] const MAV_PROTOCOL_CAPABILITY_COMPASS_CALIBRATION = 4096 ; # [doc = "Autopilot supports MAVLink version 2."] const MAV_PROTOCOL_CAPABILITY_MAVLINK2 = 8192 ; # [doc = "Autopilot supports mission fence protocol."] const MAV_PROTOCOL_CAPABILITY_MISSION_FENCE = 16384 ; # [doc = "Autopilot supports mission rally point protocol."] const MAV_PROTOCOL_CAPABILITY_MISSION_RALLY = 32768 ; # [doc = "Reserved for future use."] const MAV_PROTOCOL_CAPABILITY_RESERVED2 = 65536 ; # [doc = "Parameter protocol uses C-cast of parameter values to set the param_value (float) fields: <https://mavlink.io/en/services/parameter.html#parameter-encoding>.           Note that either this flag or MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE should be set if the parameter protocol is supported."] const MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST = 131072 ; # [doc = "This component implements/is a gimbal manager. This means the GIMBAL_MANAGER_INFORMATION, and other messages can be requested."] const MAV_PROTOCOL_CAPABILITY_COMPONENT_IMPLEMENTS_GIMBAL_MANAGER = 262144 ; # [doc = "Component supports locking control to a particular GCS independent of its system (via MAV_CMD_REQUEST_OPERATOR_CONTROL)."] const MAV_PROTOCOL_CAPABILITY_COMPONENT_ACCEPTS_GCS_CONTROL = 524288 ; } }
3350impl MavProtocolCapability {
3351    pub const DEFAULT: Self = Self::MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT;
3352}
3353impl Default for MavProtocolCapability {
3354    fn default() -> Self {
3355        Self::DEFAULT
3356    }
3357}
3358#[cfg_attr(feature = "ts", derive(TS))]
3359#[cfg_attr(feature = "ts", ts(export))]
3360#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3361#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3362#[cfg_attr(feature = "serde", serde(tag = "type"))]
3363#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3364#[repr(u32)]
3365#[doc = "Result from a MAVLink command (MAV_CMD)"]
3366pub enum MavResult {
3367    #[doc = "Command is valid (is supported and has valid parameters), and was executed."]
3368    MAV_RESULT_ACCEPTED = 0,
3369    #[doc = "Command is valid, but cannot be executed at this time. This is used to indicate a problem that should be fixed just by waiting (e.g. a state machine is busy, can't arm because have not got GPS lock, etc.). Retrying later should work."]
3370    MAV_RESULT_TEMPORARILY_REJECTED = 1,
3371    #[doc = "Command is invalid (is supported but has invalid parameters). Retrying same command and parameters will not work."]
3372    MAV_RESULT_DENIED = 2,
3373    #[doc = "Command is not supported (unknown)."]
3374    MAV_RESULT_UNSUPPORTED = 3,
3375    #[doc = "Command is valid, but execution has failed. This is used to indicate any non-temporary or unexpected problem, i.e. any problem that must be fixed before the command can succeed/be retried. For example, attempting to write a file when out of memory, attempting to arm when sensors are not calibrated, etc."]
3376    MAV_RESULT_FAILED = 4,
3377    #[doc = "Command is valid and is being executed. This will be followed by further progress updates, i.e. the component may send further COMMAND_ACK messages with result MAV_RESULT_IN_PROGRESS (at a rate decided by the implementation), and must terminate by sending a COMMAND_ACK message with final result of the operation. The COMMAND_ACK.progress field can be used to indicate the progress of the operation."]
3378    MAV_RESULT_IN_PROGRESS = 5,
3379    #[doc = "Command has been cancelled (as a result of receiving a COMMAND_CANCEL message)."]
3380    MAV_RESULT_CANCELLED = 6,
3381    #[doc = "Command is only accepted when sent as a COMMAND_LONG."]
3382    MAV_RESULT_COMMAND_LONG_ONLY = 7,
3383    #[doc = "Command is only accepted when sent as a COMMAND_INT."]
3384    MAV_RESULT_COMMAND_INT_ONLY = 8,
3385    #[doc = "Command is invalid because a frame is required and the specified frame is not supported."]
3386    MAV_RESULT_COMMAND_UNSUPPORTED_MAV_FRAME = 9,
3387}
3388impl MavResult {
3389    pub const DEFAULT: Self = Self::MAV_RESULT_ACCEPTED;
3390}
3391impl Default for MavResult {
3392    fn default() -> Self {
3393        Self::DEFAULT
3394    }
3395}
3396#[cfg_attr(feature = "ts", derive(TS))]
3397#[cfg_attr(feature = "ts", ts(export))]
3398#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3399#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3400#[cfg_attr(feature = "serde", serde(tag = "type"))]
3401#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3402#[repr(u32)]
3403#[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
3404#[doc = "The ROI (region of interest) for the vehicle. This can be                 be used by the vehicle for camera/vehicle attitude alignment (see                 MAV_CMD_NAV_ROI)."]
3405pub enum MavRoi {
3406    #[doc = "No region of interest."]
3407    MAV_ROI_NONE = 0,
3408    #[doc = "Point toward next waypoint, with optional pitch/roll/yaw offset."]
3409    MAV_ROI_WPNEXT = 1,
3410    #[doc = "Point toward given waypoint."]
3411    MAV_ROI_WPINDEX = 2,
3412    #[doc = "Point toward fixed location."]
3413    MAV_ROI_LOCATION = 3,
3414    #[doc = "Point toward of given id."]
3415    MAV_ROI_TARGET = 4,
3416}
3417impl MavRoi {
3418    pub const DEFAULT: Self = Self::MAV_ROI_NONE;
3419}
3420impl Default for MavRoi {
3421    fn default() -> Self {
3422        Self::DEFAULT
3423    }
3424}
3425#[cfg_attr(feature = "ts", derive(TS))]
3426#[cfg_attr(feature = "ts", ts(export))]
3427#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3428#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3429#[cfg_attr(feature = "serde", serde(tag = "type"))]
3430#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3431#[repr(u32)]
3432#[doc = "Enumeration of sensor orientation, according to its rotations"]
3433pub enum MavSensorOrientation {
3434    #[doc = "Roll: 0, Pitch: 0, Yaw: 0"]
3435    MAV_SENSOR_ROTATION_NONE = 0,
3436    #[doc = "Roll: 0, Pitch: 0, Yaw: 45"]
3437    MAV_SENSOR_ROTATION_YAW_45 = 1,
3438    #[doc = "Roll: 0, Pitch: 0, Yaw: 90"]
3439    MAV_SENSOR_ROTATION_YAW_90 = 2,
3440    #[doc = "Roll: 0, Pitch: 0, Yaw: 135"]
3441    MAV_SENSOR_ROTATION_YAW_135 = 3,
3442    #[doc = "Roll: 0, Pitch: 0, Yaw: 180"]
3443    MAV_SENSOR_ROTATION_YAW_180 = 4,
3444    #[doc = "Roll: 0, Pitch: 0, Yaw: 225"]
3445    MAV_SENSOR_ROTATION_YAW_225 = 5,
3446    #[doc = "Roll: 0, Pitch: 0, Yaw: 270"]
3447    MAV_SENSOR_ROTATION_YAW_270 = 6,
3448    #[doc = "Roll: 0, Pitch: 0, Yaw: 315"]
3449    MAV_SENSOR_ROTATION_YAW_315 = 7,
3450    #[doc = "Roll: 180, Pitch: 0, Yaw: 0"]
3451    MAV_SENSOR_ROTATION_ROLL_180 = 8,
3452    #[doc = "Roll: 180, Pitch: 0, Yaw: 45"]
3453    MAV_SENSOR_ROTATION_ROLL_180_YAW_45 = 9,
3454    #[doc = "Roll: 180, Pitch: 0, Yaw: 90"]
3455    MAV_SENSOR_ROTATION_ROLL_180_YAW_90 = 10,
3456    #[doc = "Roll: 180, Pitch: 0, Yaw: 135"]
3457    MAV_SENSOR_ROTATION_ROLL_180_YAW_135 = 11,
3458    #[doc = "Roll: 0, Pitch: 180, Yaw: 0"]
3459    MAV_SENSOR_ROTATION_PITCH_180 = 12,
3460    #[doc = "Roll: 180, Pitch: 0, Yaw: 225"]
3461    MAV_SENSOR_ROTATION_ROLL_180_YAW_225 = 13,
3462    #[doc = "Roll: 180, Pitch: 0, Yaw: 270"]
3463    MAV_SENSOR_ROTATION_ROLL_180_YAW_270 = 14,
3464    #[doc = "Roll: 180, Pitch: 0, Yaw: 315"]
3465    MAV_SENSOR_ROTATION_ROLL_180_YAW_315 = 15,
3466    #[doc = "Roll: 90, Pitch: 0, Yaw: 0"]
3467    MAV_SENSOR_ROTATION_ROLL_90 = 16,
3468    #[doc = "Roll: 90, Pitch: 0, Yaw: 45"]
3469    MAV_SENSOR_ROTATION_ROLL_90_YAW_45 = 17,
3470    #[doc = "Roll: 90, Pitch: 0, Yaw: 90"]
3471    MAV_SENSOR_ROTATION_ROLL_90_YAW_90 = 18,
3472    #[doc = "Roll: 90, Pitch: 0, Yaw: 135"]
3473    MAV_SENSOR_ROTATION_ROLL_90_YAW_135 = 19,
3474    #[doc = "Roll: 270, Pitch: 0, Yaw: 0"]
3475    MAV_SENSOR_ROTATION_ROLL_270 = 20,
3476    #[doc = "Roll: 270, Pitch: 0, Yaw: 45"]
3477    MAV_SENSOR_ROTATION_ROLL_270_YAW_45 = 21,
3478    #[doc = "Roll: 270, Pitch: 0, Yaw: 90"]
3479    MAV_SENSOR_ROTATION_ROLL_270_YAW_90 = 22,
3480    #[doc = "Roll: 270, Pitch: 0, Yaw: 135"]
3481    MAV_SENSOR_ROTATION_ROLL_270_YAW_135 = 23,
3482    #[doc = "Roll: 0, Pitch: 90, Yaw: 0"]
3483    MAV_SENSOR_ROTATION_PITCH_90 = 24,
3484    #[doc = "Roll: 0, Pitch: 270, Yaw: 0"]
3485    MAV_SENSOR_ROTATION_PITCH_270 = 25,
3486    #[doc = "Roll: 0, Pitch: 180, Yaw: 90"]
3487    MAV_SENSOR_ROTATION_PITCH_180_YAW_90 = 26,
3488    #[doc = "Roll: 0, Pitch: 180, Yaw: 270"]
3489    MAV_SENSOR_ROTATION_PITCH_180_YAW_270 = 27,
3490    #[doc = "Roll: 90, Pitch: 90, Yaw: 0"]
3491    MAV_SENSOR_ROTATION_ROLL_90_PITCH_90 = 28,
3492    #[doc = "Roll: 180, Pitch: 90, Yaw: 0"]
3493    MAV_SENSOR_ROTATION_ROLL_180_PITCH_90 = 29,
3494    #[doc = "Roll: 270, Pitch: 90, Yaw: 0"]
3495    MAV_SENSOR_ROTATION_ROLL_270_PITCH_90 = 30,
3496    #[doc = "Roll: 90, Pitch: 180, Yaw: 0"]
3497    MAV_SENSOR_ROTATION_ROLL_90_PITCH_180 = 31,
3498    #[doc = "Roll: 270, Pitch: 180, Yaw: 0"]
3499    MAV_SENSOR_ROTATION_ROLL_270_PITCH_180 = 32,
3500    #[doc = "Roll: 90, Pitch: 270, Yaw: 0"]
3501    MAV_SENSOR_ROTATION_ROLL_90_PITCH_270 = 33,
3502    #[doc = "Roll: 180, Pitch: 270, Yaw: 0"]
3503    MAV_SENSOR_ROTATION_ROLL_180_PITCH_270 = 34,
3504    #[doc = "Roll: 270, Pitch: 270, Yaw: 0"]
3505    MAV_SENSOR_ROTATION_ROLL_270_PITCH_270 = 35,
3506    #[doc = "Roll: 90, Pitch: 180, Yaw: 90"]
3507    MAV_SENSOR_ROTATION_ROLL_90_PITCH_180_YAW_90 = 36,
3508    #[doc = "Roll: 90, Pitch: 0, Yaw: 270"]
3509    MAV_SENSOR_ROTATION_ROLL_90_YAW_270 = 37,
3510    #[doc = "Roll: 90, Pitch: 68, Yaw: 293"]
3511    MAV_SENSOR_ROTATION_ROLL_90_PITCH_68_YAW_293 = 38,
3512    #[doc = "Pitch: 315"]
3513    MAV_SENSOR_ROTATION_PITCH_315 = 39,
3514    #[doc = "Roll: 90, Pitch: 315"]
3515    MAV_SENSOR_ROTATION_ROLL_90_PITCH_315 = 40,
3516    #[doc = "Custom orientation"]
3517    MAV_SENSOR_ROTATION_CUSTOM = 100,
3518}
3519impl MavSensorOrientation {
3520    pub const DEFAULT: Self = Self::MAV_SENSOR_ROTATION_NONE;
3521}
3522impl Default for MavSensorOrientation {
3523    fn default() -> Self {
3524        Self::DEFAULT
3525    }
3526}
3527#[cfg_attr(feature = "ts", derive(TS))]
3528#[cfg_attr(feature = "ts", ts(export))]
3529#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3530#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3531#[cfg_attr(feature = "serde", serde(tag = "type"))]
3532#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3533#[repr(u32)]
3534#[doc = "Indicates the severity level, generally used for status messages to indicate their relative urgency. Based on RFC-5424 using expanded definitions at: <http://www.kiwisyslog.com/kb/info:-syslog-message-levels/>."]
3535pub enum MavSeverity {
3536    #[doc = "System is unusable. This is a \"panic\" condition."]
3537    MAV_SEVERITY_EMERGENCY = 0,
3538    #[doc = "Action should be taken immediately. Indicates error in non-critical systems."]
3539    MAV_SEVERITY_ALERT = 1,
3540    #[doc = "Action must be taken immediately. Indicates failure in a primary system."]
3541    MAV_SEVERITY_CRITICAL = 2,
3542    #[doc = "Indicates an error in secondary/redundant systems."]
3543    MAV_SEVERITY_ERROR = 3,
3544    #[doc = "Indicates about a possible future error if this is not resolved within a given timeframe. Example would be a low battery warning."]
3545    MAV_SEVERITY_WARNING = 4,
3546    #[doc = "An unusual event has occurred, though not an error condition. This should be investigated for the root cause."]
3547    MAV_SEVERITY_NOTICE = 5,
3548    #[doc = "Normal operational messages. Useful for logging. No action is required for these messages."]
3549    MAV_SEVERITY_INFO = 6,
3550    #[doc = "Useful non-operational messages that can assist in debugging. These should not occur during normal operation."]
3551    MAV_SEVERITY_DEBUG = 7,
3552}
3553impl MavSeverity {
3554    pub const DEFAULT: Self = Self::MAV_SEVERITY_EMERGENCY;
3555}
3556impl Default for MavSeverity {
3557    fn default() -> Self {
3558        Self::DEFAULT
3559    }
3560}
3561#[cfg_attr(feature = "ts", derive(TS))]
3562#[cfg_attr(feature = "ts", ts(export))]
3563#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3564#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3565#[cfg_attr(feature = "serde", serde(tag = "type"))]
3566#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3567#[repr(u32)]
3568#[doc = "Standard modes with a well understood meaning across flight stacks and vehicle types.         For example, most flight stack have the concept of a \"return\" or \"RTL\" mode that takes a vehicle to safety, even though the precise mechanics of this mode may differ.         The modes supported by a flight stack can be queried using AVAILABLE_MODES and set using MAV_CMD_DO_SET_STANDARD_MODE.         The current mode is streamed in CURRENT_MODE.         See <https://mavlink.io/en/services/standard_modes.html>"]
3569pub enum MavStandardMode {
3570    #[doc = "Non standard mode.           This may be used when reporting the mode if the current flight mode is not a standard mode."]
3571    MAV_STANDARD_MODE_NON_STANDARD = 0,
3572    #[doc = "Position mode (manual).           Position-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold both position and altitude against wind and external forces.           This mode can only be set by vehicles that can hold a fixed position.           Multicopter (MC) vehicles actively brake and hold both position and altitude against wind and external forces.           Hybrid MC/FW (\"VTOL\") vehicles first transition to multicopter mode (if needed) but otherwise behave in the same way as MC vehicles.           Fixed-wing (FW) vehicles must not support this mode.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3573    MAV_STANDARD_MODE_POSITION_HOLD = 1,
3574    #[doc = "Orbit (manual).           Position-controlled and stabilized manual mode.           The vehicle circles around a fixed setpoint in the horizontal plane at a particular radius, altitude, and direction.           Flight stacks may further allow manual control over the setpoint position, radius, direction, speed, and/or altitude of the circle, but this is not mandated.           Flight stacks may support the [MAV_CMD_DO_ORBIT](<https://mavlink.io/en/messages/common.html#MAV_CMD_DO_ORBIT>) for changing the orbit parameters.           MC and FW vehicles may support this mode.           Hybrid MC/FW (\"VTOL\") vehicles may support this mode in MC/FW or both modes; if the mode is not supported by the current configuration the vehicle should transition to the supported configuration.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3575    MAV_STANDARD_MODE_ORBIT = 2,
3576    #[doc = "Cruise mode (manual).           Position-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold their original track against wind and external forces.           Fixed-wing (FW) vehicles level orientation and maintain current track and altitude against wind and external forces.           Hybrid MC/FW (\"VTOL\") vehicles first transition to FW mode (if needed) but otherwise behave in the same way as MC vehicles.           Multicopter (MC) vehicles must not support this mode.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3577    MAV_STANDARD_MODE_CRUISE = 3,
3578    #[doc = "Altitude hold (manual).           Altitude-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold their altitude.           MC vehicles continue with existing momentum and may move with wind (or other external forces).           FW vehicles continue with current heading, but may be moved off-track by wind.           Hybrid MC/FW (\"VTOL\") vehicles behave according to their current configuration/mode (FW or MC).           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3579    MAV_STANDARD_MODE_ALTITUDE_HOLD = 4,
3580    #[doc = "Safe recovery mode (auto).           Automatic mode that takes vehicle to a predefined safe location via a safe flight path, and may also automatically land the vehicle.           This mode is more commonly referred to as RTL and/or or Smart RTL.           The precise return location, flight path, and landing behaviour depend on vehicle configuration and type.           For example, the vehicle might return to the home/launch location, a rally point, or the start of a mission landing, it might follow a direct path, mission path, or breadcrumb path, and land using a mission landing pattern or some other kind of descent."]
3581    MAV_STANDARD_MODE_SAFE_RECOVERY = 5,
3582    #[doc = "Mission mode (automatic).           Automatic mode that executes MAVLink missions.           Missions are executed from the current waypoint as soon as the mode is enabled."]
3583    MAV_STANDARD_MODE_MISSION = 6,
3584    #[doc = "Land mode (auto).           Automatic mode that lands the vehicle at the current location.           The precise landing behaviour depends on vehicle configuration and type."]
3585    MAV_STANDARD_MODE_LAND = 7,
3586    #[doc = "Takeoff mode (auto).           Automatic takeoff mode.           The precise takeoff behaviour depends on vehicle configuration and type."]
3587    MAV_STANDARD_MODE_TAKEOFF = 8,
3588}
3589impl MavStandardMode {
3590    pub const DEFAULT: Self = Self::MAV_STANDARD_MODE_NON_STANDARD;
3591}
3592impl Default for MavStandardMode {
3593    fn default() -> Self {
3594        Self::DEFAULT
3595    }
3596}
3597#[cfg_attr(feature = "ts", derive(TS))]
3598#[cfg_attr(feature = "ts", ts(export))]
3599#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3600#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3601#[cfg_attr(feature = "serde", serde(tag = "type"))]
3602#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3603#[repr(u32)]
3604pub enum MavState {
3605    #[doc = "Uninitialized system, state is unknown."]
3606    MAV_STATE_UNINIT = 0,
3607    #[doc = "System is booting up."]
3608    MAV_STATE_BOOT = 1,
3609    #[doc = "System is calibrating and not flight-ready."]
3610    MAV_STATE_CALIBRATING = 2,
3611    #[doc = "System is grounded and on standby. It can be launched any time."]
3612    MAV_STATE_STANDBY = 3,
3613    #[doc = "System is active and might be already airborne. Motors are engaged."]
3614    MAV_STATE_ACTIVE = 4,
3615    #[doc = "System is in a non-normal flight mode (failsafe). It can however still navigate."]
3616    MAV_STATE_CRITICAL = 5,
3617    #[doc = "System is in a non-normal flight mode (failsafe). It lost control over parts or over the whole airframe. It is in mayday and going down."]
3618    MAV_STATE_EMERGENCY = 6,
3619    #[doc = "System just initialized its power-down sequence, will shut down now."]
3620    MAV_STATE_POWEROFF = 7,
3621    #[doc = "System is terminating itself (failsafe or commanded)."]
3622    MAV_STATE_FLIGHT_TERMINATION = 8,
3623}
3624impl MavState {
3625    pub const DEFAULT: Self = Self::MAV_STATE_UNINIT;
3626}
3627impl Default for MavState {
3628    fn default() -> Self {
3629        Self::DEFAULT
3630    }
3631}
3632bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These encode the sensors whose status is sent as part of the SYS_STATUS message."] pub struct MavSysStatusSensor : u32 { # [doc = "0x01 3D gyro"] const MAV_SYS_STATUS_SENSOR_3D_GYRO = 1 ; # [doc = "0x02 3D accelerometer"] const MAV_SYS_STATUS_SENSOR_3D_ACCEL = 2 ; # [doc = "0x04 3D magnetometer"] const MAV_SYS_STATUS_SENSOR_3D_MAG = 4 ; # [doc = "0x08 absolute pressure"] const MAV_SYS_STATUS_SENSOR_ABSOLUTE_PRESSURE = 8 ; # [doc = "0x10 differential pressure"] const MAV_SYS_STATUS_SENSOR_DIFFERENTIAL_PRESSURE = 16 ; # [doc = "0x20 GPS"] const MAV_SYS_STATUS_SENSOR_GPS = 32 ; # [doc = "0x40 optical flow"] const MAV_SYS_STATUS_SENSOR_OPTICAL_FLOW = 64 ; # [doc = "0x80 computer vision position"] const MAV_SYS_STATUS_SENSOR_VISION_POSITION = 128 ; # [doc = "0x100 laser based position"] const MAV_SYS_STATUS_SENSOR_LASER_POSITION = 256 ; # [doc = "0x200 external ground truth (Vicon or Leica)"] const MAV_SYS_STATUS_SENSOR_EXTERNAL_GROUND_TRUTH = 512 ; # [doc = "0x400 3D angular rate control"] const MAV_SYS_STATUS_SENSOR_ANGULAR_RATE_CONTROL = 1024 ; # [doc = "0x800 attitude stabilization"] const MAV_SYS_STATUS_SENSOR_ATTITUDE_STABILIZATION = 2048 ; # [doc = "0x1000 yaw position"] const MAV_SYS_STATUS_SENSOR_YAW_POSITION = 4096 ; # [doc = "0x2000 z/altitude control"] const MAV_SYS_STATUS_SENSOR_Z_ALTITUDE_CONTROL = 8192 ; # [doc = "0x4000 x/y position control"] const MAV_SYS_STATUS_SENSOR_XY_POSITION_CONTROL = 16384 ; # [doc = "0x8000 motor outputs / control"] const MAV_SYS_STATUS_SENSOR_MOTOR_OUTPUTS = 32768 ; # [doc = "0x10000 RC receiver"] const MAV_SYS_STATUS_SENSOR_RC_RECEIVER = 65536 ; # [doc = "0x20000 2nd 3D gyro"] const MAV_SYS_STATUS_SENSOR_3D_GYRO2 = 131072 ; # [doc = "0x40000 2nd 3D accelerometer"] const MAV_SYS_STATUS_SENSOR_3D_ACCEL2 = 262144 ; # [doc = "0x80000 2nd 3D magnetometer"] const MAV_SYS_STATUS_SENSOR_3D_MAG2 = 524288 ; # [doc = "0x100000 geofence"] const MAV_SYS_STATUS_GEOFENCE = 1048576 ; # [doc = "0x200000 AHRS subsystem health"] const MAV_SYS_STATUS_AHRS = 2097152 ; # [doc = "0x400000 Terrain subsystem health"] const MAV_SYS_STATUS_TERRAIN = 4194304 ; # [doc = "0x800000 Motors are reversed"] const MAV_SYS_STATUS_REVERSE_MOTOR = 8388608 ; # [doc = "0x1000000 Logging"] const MAV_SYS_STATUS_LOGGING = 16777216 ; # [doc = "0x2000000 Battery"] const MAV_SYS_STATUS_SENSOR_BATTERY = 33554432 ; # [doc = "0x4000000 Proximity"] const MAV_SYS_STATUS_SENSOR_PROXIMITY = 67108864 ; # [doc = "0x8000000 Satellite Communication"] const MAV_SYS_STATUS_SENSOR_SATCOM = 134217728 ; # [doc = "0x10000000 pre-arm check status. Always healthy when armed"] const MAV_SYS_STATUS_PREARM_CHECK = 268435456 ; # [doc = "0x20000000 Avoidance/collision prevention"] const MAV_SYS_STATUS_OBSTACLE_AVOIDANCE = 536870912 ; # [doc = "0x40000000 propulsion (actuator, esc, motor or propellor)"] const MAV_SYS_STATUS_SENSOR_PROPULSION = 1073741824 ; # [doc = "0x80000000 Extended bit-field are used for further sensor status bits (needs to be set in onboard_control_sensors_present only)"] const MAV_SYS_STATUS_EXTENSION_USED = 2147483648 ; } }
3633impl MavSysStatusSensor {
3634    pub const DEFAULT: Self = Self::MAV_SYS_STATUS_SENSOR_3D_GYRO;
3635}
3636impl Default for MavSysStatusSensor {
3637    fn default() -> Self {
3638        Self::DEFAULT
3639    }
3640}
3641bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These encode the sensors whose status is sent as part of the SYS_STATUS message in the extended fields."] pub struct MavSysStatusSensorExtended : u32 { # [doc = "0x01 Recovery system (parachute, balloon, retracts etc)"] const MAV_SYS_STATUS_RECOVERY_SYSTEM = 1 ; } }
3642impl MavSysStatusSensorExtended {
3643    pub const DEFAULT: Self = Self::MAV_SYS_STATUS_RECOVERY_SYSTEM;
3644}
3645impl Default for MavSysStatusSensorExtended {
3646    fn default() -> Self {
3647        Self::DEFAULT
3648    }
3649}
3650#[cfg_attr(feature = "ts", derive(TS))]
3651#[cfg_attr(feature = "ts", ts(export))]
3652#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3653#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3654#[cfg_attr(feature = "serde", serde(tag = "type"))]
3655#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3656#[repr(u32)]
3657pub enum MavTunnelPayloadType {
3658    #[doc = "Encoding of payload unknown."]
3659    MAV_TUNNEL_PAYLOAD_TYPE_UNKNOWN = 0,
3660    #[doc = "Registered for STorM32 gimbal controller."]
3661    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED0 = 200,
3662    #[doc = "Registered for STorM32 gimbal controller."]
3663    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED1 = 201,
3664    #[doc = "Registered for STorM32 gimbal controller."]
3665    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED2 = 202,
3666    #[doc = "Registered for STorM32 gimbal controller."]
3667    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED3 = 203,
3668    #[doc = "Registered for STorM32 gimbal controller."]
3669    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED4 = 204,
3670    #[doc = "Registered for STorM32 gimbal controller."]
3671    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED5 = 205,
3672    #[doc = "Registered for STorM32 gimbal controller."]
3673    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED6 = 206,
3674    #[doc = "Registered for STorM32 gimbal controller."]
3675    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED7 = 207,
3676    #[doc = "Registered for STorM32 gimbal controller."]
3677    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED8 = 208,
3678    #[doc = "Registered for STorM32 gimbal controller."]
3679    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED9 = 209,
3680    #[doc = "Registered for ModalAI remote OSD protocol."]
3681    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_REMOTE_OSD = 210,
3682    #[doc = "Registered for ModalAI ESC UART passthru protocol."]
3683    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_ESC_UART_PASSTHRU = 211,
3684    #[doc = "Registered for ModalAI vendor use."]
3685    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_IO_UART_PASSTHRU = 212,
3686}
3687impl MavTunnelPayloadType {
3688    pub const DEFAULT: Self = Self::MAV_TUNNEL_PAYLOAD_TYPE_UNKNOWN;
3689}
3690impl Default for MavTunnelPayloadType {
3691    fn default() -> Self {
3692        Self::DEFAULT
3693    }
3694}
3695#[cfg_attr(feature = "ts", derive(TS))]
3696#[cfg_attr(feature = "ts", ts(export))]
3697#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3698#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3699#[cfg_attr(feature = "serde", serde(tag = "type"))]
3700#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3701#[repr(u32)]
3702#[doc = "MAVLINK component type reported in HEARTBEAT message. Flight controllers must report the type of the vehicle on which they are mounted (e.g. MAV_TYPE_OCTOROTOR). All other components must report a value appropriate for their type (e.g. a camera must use MAV_TYPE_CAMERA)."]
3703pub enum MavType {
3704    #[doc = "Generic micro air vehicle"]
3705    MAV_TYPE_GENERIC = 0,
3706    #[doc = "Fixed wing aircraft."]
3707    MAV_TYPE_FIXED_WING = 1,
3708    #[doc = "Quadrotor"]
3709    MAV_TYPE_QUADROTOR = 2,
3710    #[doc = "Coaxial helicopter"]
3711    MAV_TYPE_COAXIAL = 3,
3712    #[doc = "Normal helicopter with tail rotor."]
3713    MAV_TYPE_HELICOPTER = 4,
3714    #[doc = "Ground installation"]
3715    MAV_TYPE_ANTENNA_TRACKER = 5,
3716    #[doc = "Operator control unit / ground control station"]
3717    MAV_TYPE_GCS = 6,
3718    #[doc = "Airship, controlled"]
3719    MAV_TYPE_AIRSHIP = 7,
3720    #[doc = "Free balloon, uncontrolled"]
3721    MAV_TYPE_FREE_BALLOON = 8,
3722    #[doc = "Rocket"]
3723    MAV_TYPE_ROCKET = 9,
3724    #[doc = "Ground rover"]
3725    MAV_TYPE_GROUND_ROVER = 10,
3726    #[doc = "Surface vessel, boat, ship"]
3727    MAV_TYPE_SURFACE_BOAT = 11,
3728    #[doc = "Submarine"]
3729    MAV_TYPE_SUBMARINE = 12,
3730    #[doc = "Hexarotor"]
3731    MAV_TYPE_HEXAROTOR = 13,
3732    #[doc = "Octorotor"]
3733    MAV_TYPE_OCTOROTOR = 14,
3734    #[doc = "Tricopter"]
3735    MAV_TYPE_TRICOPTER = 15,
3736    #[doc = "Flapping wing"]
3737    MAV_TYPE_FLAPPING_WING = 16,
3738    #[doc = "Kite"]
3739    MAV_TYPE_KITE = 17,
3740    #[doc = "Onboard companion controller"]
3741    MAV_TYPE_ONBOARD_CONTROLLER = 18,
3742    #[doc = "Two-rotor Tailsitter VTOL that additionally uses control surfaces in vertical operation. Note, value previously named MAV_TYPE_VTOL_DUOROTOR."]
3743    MAV_TYPE_VTOL_TAILSITTER_DUOROTOR = 19,
3744    #[doc = "Quad-rotor Tailsitter VTOL using a V-shaped quad config in vertical operation. Note: value previously named MAV_TYPE_VTOL_QUADROTOR."]
3745    MAV_TYPE_VTOL_TAILSITTER_QUADROTOR = 20,
3746    #[doc = "Tiltrotor VTOL. Fuselage and wings stay (nominally) horizontal in all flight phases. It able to tilt (some) rotors to provide thrust in cruise flight."]
3747    MAV_TYPE_VTOL_TILTROTOR = 21,
3748    #[doc = "VTOL with separate fixed rotors for hover and cruise flight. Fuselage and wings stay (nominally) horizontal in all flight phases."]
3749    MAV_TYPE_VTOL_FIXEDROTOR = 22,
3750    #[doc = "Tailsitter VTOL. Fuselage and wings orientation changes depending on flight phase: vertical for hover, horizontal for cruise. Use more specific VTOL MAV_TYPE_VTOL_TAILSITTER_DUOROTOR or MAV_TYPE_VTOL_TAILSITTER_QUADROTOR if appropriate."]
3751    MAV_TYPE_VTOL_TAILSITTER = 23,
3752    #[doc = "Tiltwing VTOL. Fuselage stays horizontal in all flight phases. The whole wing, along with any attached engine, can tilt between vertical and horizontal mode."]
3753    MAV_TYPE_VTOL_TILTWING = 24,
3754    #[doc = "VTOL reserved 5"]
3755    MAV_TYPE_VTOL_RESERVED5 = 25,
3756    #[doc = "Gimbal"]
3757    MAV_TYPE_GIMBAL = 26,
3758    #[doc = "ADSB system"]
3759    MAV_TYPE_ADSB = 27,
3760    #[doc = "Steerable, nonrigid airfoil"]
3761    MAV_TYPE_PARAFOIL = 28,
3762    #[doc = "Dodecarotor"]
3763    MAV_TYPE_DODECAROTOR = 29,
3764    #[doc = "Camera"]
3765    MAV_TYPE_CAMERA = 30,
3766    #[doc = "Charging station"]
3767    MAV_TYPE_CHARGING_STATION = 31,
3768    #[doc = "FLARM collision avoidance system"]
3769    MAV_TYPE_FLARM = 32,
3770    #[doc = "Servo"]
3771    MAV_TYPE_SERVO = 33,
3772    #[doc = "Open Drone ID. See <https://mavlink.io/en/services/opendroneid.html>."]
3773    MAV_TYPE_ODID = 34,
3774    #[doc = "Decarotor"]
3775    MAV_TYPE_DECAROTOR = 35,
3776    #[doc = "Battery"]
3777    MAV_TYPE_BATTERY = 36,
3778    #[doc = "Parachute"]
3779    MAV_TYPE_PARACHUTE = 37,
3780    #[doc = "Log"]
3781    MAV_TYPE_LOG = 38,
3782    #[doc = "OSD"]
3783    MAV_TYPE_OSD = 39,
3784    #[doc = "IMU"]
3785    MAV_TYPE_IMU = 40,
3786    #[doc = "GPS"]
3787    MAV_TYPE_GPS = 41,
3788    #[doc = "Winch"]
3789    MAV_TYPE_WINCH = 42,
3790    #[doc = "Generic multirotor that does not fit into a specific type or whose type is unknown"]
3791    MAV_TYPE_GENERIC_MULTIROTOR = 43,
3792    #[doc = "Illuminator. An illuminator is a light source that is used for lighting up dark areas external to the sytstem: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
3793    MAV_TYPE_ILLUMINATOR = 44,
3794    #[doc = "Orbiter spacecraft. Includes satellites orbiting terrestrial and extra-terrestrial bodies. Follows NASA Spacecraft Classification."]
3795    MAV_TYPE_SPACECRAFT_ORBITER = 45,
3796}
3797impl MavType {
3798    pub const DEFAULT: Self = Self::MAV_TYPE_GENERIC;
3799}
3800impl Default for MavType {
3801    fn default() -> Self {
3802        Self::DEFAULT
3803    }
3804}
3805#[cfg_attr(feature = "ts", derive(TS))]
3806#[cfg_attr(feature = "ts", ts(export))]
3807#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3808#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3809#[cfg_attr(feature = "serde", serde(tag = "type"))]
3810#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3811#[repr(u32)]
3812#[doc = "Enumeration of VTOL states"]
3813pub enum MavVtolState {
3814    #[doc = "MAV is not configured as VTOL"]
3815    MAV_VTOL_STATE_UNDEFINED = 0,
3816    #[doc = "VTOL is in transition from multicopter to fixed-wing"]
3817    MAV_VTOL_STATE_TRANSITION_TO_FW = 1,
3818    #[doc = "VTOL is in transition from fixed-wing to multicopter"]
3819    MAV_VTOL_STATE_TRANSITION_TO_MC = 2,
3820    #[doc = "VTOL is in multicopter state"]
3821    MAV_VTOL_STATE_MC = 3,
3822    #[doc = "VTOL is in fixed-wing state"]
3823    MAV_VTOL_STATE_FW = 4,
3824}
3825impl MavVtolState {
3826    pub const DEFAULT: Self = Self::MAV_VTOL_STATE_UNDEFINED;
3827}
3828impl Default for MavVtolState {
3829    fn default() -> Self {
3830        Self::DEFAULT
3831    }
3832}
3833bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Winch status flags used in WINCH_STATUS"] pub struct MavWinchStatusFlag : u32 { # [doc = "Winch is healthy"] const MAV_WINCH_STATUS_HEALTHY = 1 ; # [doc = "Winch line is fully retracted"] const MAV_WINCH_STATUS_FULLY_RETRACTED = 2 ; # [doc = "Winch motor is moving"] const MAV_WINCH_STATUS_MOVING = 4 ; # [doc = "Winch clutch is engaged allowing motor to move freely."] const MAV_WINCH_STATUS_CLUTCH_ENGAGED = 8 ; # [doc = "Winch is locked by locking mechanism."] const MAV_WINCH_STATUS_LOCKED = 16 ; # [doc = "Winch is gravity dropping payload."] const MAV_WINCH_STATUS_DROPPING = 32 ; # [doc = "Winch is arresting payload descent."] const MAV_WINCH_STATUS_ARRESTING = 64 ; # [doc = "Winch is using torque measurements to sense the ground."] const MAV_WINCH_STATUS_GROUND_SENSE = 128 ; # [doc = "Winch is returning to the fully retracted position."] const MAV_WINCH_STATUS_RETRACTING = 256 ; # [doc = "Winch is redelivering the payload. This is a failover state if the line tension goes above a threshold during RETRACTING."] const MAV_WINCH_STATUS_REDELIVER = 512 ; # [doc = "Winch is abandoning the line and possibly payload. Winch unspools the entire calculated line length. This is a failover state from REDELIVER if the number of attempts exceeds a threshold."] const MAV_WINCH_STATUS_ABANDON_LINE = 1024 ; # [doc = "Winch is engaging the locking mechanism."] const MAV_WINCH_STATUS_LOCKING = 2048 ; # [doc = "Winch is spooling on line."] const MAV_WINCH_STATUS_LOAD_LINE = 4096 ; # [doc = "Winch is loading a payload."] const MAV_WINCH_STATUS_LOAD_PAYLOAD = 8192 ; } }
3834impl MavWinchStatusFlag {
3835    pub const DEFAULT: Self = Self::MAV_WINCH_STATUS_HEALTHY;
3836}
3837impl Default for MavWinchStatusFlag {
3838    fn default() -> Self {
3839        Self::DEFAULT
3840    }
3841}
3842#[cfg_attr(feature = "ts", derive(TS))]
3843#[cfg_attr(feature = "ts", ts(export))]
3844#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3845#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3846#[cfg_attr(feature = "serde", serde(tag = "type"))]
3847#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3848#[repr(u32)]
3849pub enum MavlinkDataStreamType {
3850    MAVLINK_DATA_STREAM_IMG_JPEG = 0,
3851    MAVLINK_DATA_STREAM_IMG_BMP = 1,
3852    MAVLINK_DATA_STREAM_IMG_RAW8U = 2,
3853    MAVLINK_DATA_STREAM_IMG_RAW32U = 3,
3854    MAVLINK_DATA_STREAM_IMG_PGM = 4,
3855    MAVLINK_DATA_STREAM_IMG_PNG = 5,
3856}
3857impl MavlinkDataStreamType {
3858    pub const DEFAULT: Self = Self::MAVLINK_DATA_STREAM_IMG_JPEG;
3859}
3860impl Default for MavlinkDataStreamType {
3861    fn default() -> Self {
3862        Self::DEFAULT
3863    }
3864}
3865#[cfg_attr(feature = "ts", derive(TS))]
3866#[cfg_attr(feature = "ts", ts(export))]
3867#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3868#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3869#[cfg_attr(feature = "serde", serde(tag = "type"))]
3870#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3871#[repr(u32)]
3872#[doc = "States of the mission state machine.         Note that these states are independent of whether the mission is in a mode that can execute mission items or not (is suspended).         They may not all be relevant on all vehicles."]
3873pub enum MissionState {
3874    #[doc = "The mission status reporting is not supported."]
3875    MISSION_STATE_UNKNOWN = 0,
3876    #[doc = "No mission on the vehicle."]
3877    MISSION_STATE_NO_MISSION = 1,
3878    #[doc = "Mission has not started. This is the case after a mission has uploaded but not yet started executing."]
3879    MISSION_STATE_NOT_STARTED = 2,
3880    #[doc = "Mission is active, and will execute mission items when in auto mode."]
3881    MISSION_STATE_ACTIVE = 3,
3882    #[doc = "Mission is paused when in auto mode."]
3883    MISSION_STATE_PAUSED = 4,
3884    #[doc = "Mission has executed all mission items."]
3885    MISSION_STATE_COMPLETE = 5,
3886}
3887impl MissionState {
3888    pub const DEFAULT: Self = Self::MISSION_STATE_UNKNOWN;
3889}
3890impl Default for MissionState {
3891    fn default() -> Self {
3892        Self::DEFAULT
3893    }
3894}
3895#[cfg_attr(feature = "ts", derive(TS))]
3896#[cfg_attr(feature = "ts", ts(export))]
3897#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3898#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3899#[cfg_attr(feature = "serde", serde(tag = "type"))]
3900#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3901#[repr(u32)]
3902#[doc = "Sequence that motors are tested when using MAV_CMD_DO_MOTOR_TEST."]
3903pub enum MotorTestOrder {
3904    #[doc = "Default autopilot motor test method."]
3905    MOTOR_TEST_ORDER_DEFAULT = 0,
3906    #[doc = "Motor numbers are specified as their index in a predefined vehicle-specific sequence."]
3907    MOTOR_TEST_ORDER_SEQUENCE = 1,
3908    #[doc = "Motor numbers are specified as the output as labeled on the board."]
3909    MOTOR_TEST_ORDER_BOARD = 2,
3910}
3911impl MotorTestOrder {
3912    pub const DEFAULT: Self = Self::MOTOR_TEST_ORDER_DEFAULT;
3913}
3914impl Default for MotorTestOrder {
3915    fn default() -> Self {
3916        Self::DEFAULT
3917    }
3918}
3919#[cfg_attr(feature = "ts", derive(TS))]
3920#[cfg_attr(feature = "ts", ts(export))]
3921#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3922#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3923#[cfg_attr(feature = "serde", serde(tag = "type"))]
3924#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3925#[repr(u32)]
3926#[doc = "Defines how throttle value is represented in MAV_CMD_DO_MOTOR_TEST."]
3927pub enum MotorTestThrottleType {
3928    #[doc = "Throttle as a percentage (0 ~ 100)"]
3929    MOTOR_TEST_THROTTLE_PERCENT = 0,
3930    #[doc = "Throttle as an absolute PWM value (normally in range of 1000~2000)."]
3931    MOTOR_TEST_THROTTLE_PWM = 1,
3932    #[doc = "Throttle pass-through from pilot's transmitter."]
3933    MOTOR_TEST_THROTTLE_PILOT = 2,
3934    #[doc = "Per-motor compass calibration test."]
3935    MOTOR_TEST_COMPASS_CAL = 3,
3936}
3937impl MotorTestThrottleType {
3938    pub const DEFAULT: Self = Self::MOTOR_TEST_THROTTLE_PERCENT;
3939}
3940impl Default for MotorTestThrottleType {
3941    fn default() -> Self {
3942        Self::DEFAULT
3943    }
3944}
3945#[cfg_attr(feature = "ts", derive(TS))]
3946#[cfg_attr(feature = "ts", ts(export))]
3947#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3948#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3949#[cfg_attr(feature = "serde", serde(tag = "type"))]
3950#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3951#[repr(u32)]
3952pub enum NavVtolLandOptions {
3953    #[doc = "Default autopilot landing behaviour."]
3954    NAV_VTOL_LAND_OPTIONS_DEFAULT = 0,
3955    #[doc = "Descend in fixed wing mode, transitioning to multicopter mode for vertical landing when close to the ground.           The fixed wing descent pattern is at the discretion of the vehicle (e.g. transition altitude, loiter direction, radius, and speed, etc.)."]
3956    NAV_VTOL_LAND_OPTIONS_FW_DESCENT = 1,
3957    #[doc = "Land in multicopter mode on reaching the landing coordinates (the whole landing is by \"hover descent\")."]
3958    NAV_VTOL_LAND_OPTIONS_HOVER_DESCENT = 2,
3959}
3960impl NavVtolLandOptions {
3961    pub const DEFAULT: Self = Self::NAV_VTOL_LAND_OPTIONS_DEFAULT;
3962}
3963impl Default for NavVtolLandOptions {
3964    fn default() -> Self {
3965        Self::DEFAULT
3966    }
3967}
3968#[cfg_attr(feature = "ts", derive(TS))]
3969#[cfg_attr(feature = "ts", ts(export))]
3970#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3971#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3972#[cfg_attr(feature = "serde", serde(tag = "type"))]
3973#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3974#[repr(u32)]
3975#[doc = "Yaw behaviour during orbit flight."]
3976pub enum OrbitYawBehaviour {
3977    #[doc = "Vehicle front points to the center (default)."]
3978    ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TO_CIRCLE_CENTER = 0,
3979    #[doc = "Vehicle front holds heading when message received."]
3980    ORBIT_YAW_BEHAVIOUR_HOLD_INITIAL_HEADING = 1,
3981    #[doc = "Yaw uncontrolled."]
3982    ORBIT_YAW_BEHAVIOUR_UNCONTROLLED = 2,
3983    #[doc = "Vehicle front follows flight path (tangential to circle)."]
3984    ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TANGENT_TO_CIRCLE = 3,
3985    #[doc = "Yaw controlled by RC input."]
3986    ORBIT_YAW_BEHAVIOUR_RC_CONTROLLED = 4,
3987    #[doc = "Vehicle uses current yaw behaviour (unchanged). The vehicle-default yaw behaviour is used if this value is specified when orbit is first commanded."]
3988    ORBIT_YAW_BEHAVIOUR_UNCHANGED = 5,
3989}
3990impl OrbitYawBehaviour {
3991    pub const DEFAULT: Self = Self::ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TO_CIRCLE_CENTER;
3992}
3993impl Default for OrbitYawBehaviour {
3994    fn default() -> Self {
3995        Self::DEFAULT
3996    }
3997}
3998#[cfg_attr(feature = "ts", derive(TS))]
3999#[cfg_attr(feature = "ts", ts(export))]
4000#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4001#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4002#[cfg_attr(feature = "serde", serde(tag = "type"))]
4003#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4004#[repr(u32)]
4005#[doc = "Parachute actions. Trigger release and enable/disable auto-release."]
4006pub enum ParachuteAction {
4007    #[doc = "Disable auto-release of parachute (i.e. release triggered by crash detectors)."]
4008    PARACHUTE_DISABLE = 0,
4009    #[doc = "Enable auto-release of parachute."]
4010    PARACHUTE_ENABLE = 1,
4011    #[doc = "Release parachute and kill motors."]
4012    PARACHUTE_RELEASE = 2,
4013}
4014impl ParachuteAction {
4015    pub const DEFAULT: Self = Self::PARACHUTE_DISABLE;
4016}
4017impl Default for ParachuteAction {
4018    fn default() -> Self {
4019        Self::DEFAULT
4020    }
4021}
4022#[cfg_attr(feature = "ts", derive(TS))]
4023#[cfg_attr(feature = "ts", ts(export))]
4024#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4025#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4026#[cfg_attr(feature = "serde", serde(tag = "type"))]
4027#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4028#[repr(u32)]
4029#[doc = "Result from PARAM_EXT_SET message."]
4030pub enum ParamAck {
4031    #[doc = "Parameter value ACCEPTED and SET"]
4032    PARAM_ACK_ACCEPTED = 0,
4033    #[doc = "Parameter value UNKNOWN/UNSUPPORTED"]
4034    PARAM_ACK_VALUE_UNSUPPORTED = 1,
4035    #[doc = "Parameter failed to set"]
4036    PARAM_ACK_FAILED = 2,
4037    #[doc = "Parameter value received but not yet set/accepted. A subsequent PARAM_EXT_ACK with the final result will follow once operation is completed. This is returned immediately for parameters that take longer to set, indicating that the the parameter was received and does not need to be resent."]
4038    PARAM_ACK_IN_PROGRESS = 3,
4039}
4040impl ParamAck {
4041    pub const DEFAULT: Self = Self::PARAM_ACK_ACCEPTED;
4042}
4043impl Default for ParamAck {
4044    fn default() -> Self {
4045        Self::DEFAULT
4046    }
4047}
4048bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmap to indicate which dimensions should be ignored by the vehicle: a value of 0b0000000000000000 or 0b0000001000000000 indicates that none of the setpoint dimensions should be ignored. If bit 9 is set the floats afx afy afz should be interpreted as force instead of acceleration."] pub struct PositionTargetTypemask : u16 { # [doc = "Ignore position x"] const POSITION_TARGET_TYPEMASK_X_IGNORE = 1 ; # [doc = "Ignore position y"] const POSITION_TARGET_TYPEMASK_Y_IGNORE = 2 ; # [doc = "Ignore position z"] const POSITION_TARGET_TYPEMASK_Z_IGNORE = 4 ; # [doc = "Ignore velocity x"] const POSITION_TARGET_TYPEMASK_VX_IGNORE = 8 ; # [doc = "Ignore velocity y"] const POSITION_TARGET_TYPEMASK_VY_IGNORE = 16 ; # [doc = "Ignore velocity z"] const POSITION_TARGET_TYPEMASK_VZ_IGNORE = 32 ; # [doc = "Ignore acceleration x"] const POSITION_TARGET_TYPEMASK_AX_IGNORE = 64 ; # [doc = "Ignore acceleration y"] const POSITION_TARGET_TYPEMASK_AY_IGNORE = 128 ; # [doc = "Ignore acceleration z"] const POSITION_TARGET_TYPEMASK_AZ_IGNORE = 256 ; # [doc = "Use force instead of acceleration"] const POSITION_TARGET_TYPEMASK_FORCE_SET = 512 ; # [doc = "Ignore yaw"] const POSITION_TARGET_TYPEMASK_YAW_IGNORE = 1024 ; # [doc = "Ignore yaw rate"] const POSITION_TARGET_TYPEMASK_YAW_RATE_IGNORE = 2048 ; } }
4049impl PositionTargetTypemask {
4050    pub const DEFAULT: Self = Self::POSITION_TARGET_TYPEMASK_X_IGNORE;
4051}
4052impl Default for PositionTargetTypemask {
4053    fn default() -> Self {
4054        Self::DEFAULT
4055    }
4056}
4057#[cfg_attr(feature = "ts", derive(TS))]
4058#[cfg_attr(feature = "ts", ts(export))]
4059#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4060#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4061#[cfg_attr(feature = "serde", serde(tag = "type"))]
4062#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4063#[repr(u32)]
4064#[doc = "Precision land modes (used in MAV_CMD_NAV_LAND)."]
4065pub enum PrecisionLandMode {
4066    #[doc = "Normal (non-precision) landing."]
4067    PRECISION_LAND_MODE_DISABLED = 0,
4068    #[doc = "Use precision landing if beacon detected when land command accepted, otherwise land normally."]
4069    PRECISION_LAND_MODE_OPPORTUNISTIC = 1,
4070    #[doc = "Use precision landing, searching for beacon if not found when land command accepted (land normally if beacon cannot be found)."]
4071    PRECISION_LAND_MODE_REQUIRED = 2,
4072}
4073impl PrecisionLandMode {
4074    pub const DEFAULT: Self = Self::PRECISION_LAND_MODE_DISABLED;
4075}
4076impl Default for PrecisionLandMode {
4077    fn default() -> Self {
4078        Self::DEFAULT
4079    }
4080}
4081#[cfg_attr(feature = "ts", derive(TS))]
4082#[cfg_attr(feature = "ts", ts(export))]
4083#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4084#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4085#[cfg_attr(feature = "serde", serde(tag = "type"))]
4086#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4087#[repr(u32)]
4088#[doc = "Actions for reading and writing plan information (mission, rally points, geofence) between persistent and volatile storage when using MAV_CMD_PREFLIGHT_STORAGE.         (Commonly missions are loaded from persistent storage (flash/EEPROM) into volatile storage (RAM) on startup and written back when they are changed.)"]
4089pub enum PreflightStorageMissionAction {
4090    #[doc = "Read current mission data from persistent storage"]
4091    MISSION_READ_PERSISTENT = 0,
4092    #[doc = "Write current mission data to persistent storage"]
4093    MISSION_WRITE_PERSISTENT = 1,
4094    #[doc = "Erase all mission data stored on the vehicle (both persistent and volatile storage)"]
4095    MISSION_RESET_DEFAULT = 2,
4096}
4097impl PreflightStorageMissionAction {
4098    pub const DEFAULT: Self = Self::MISSION_READ_PERSISTENT;
4099}
4100impl Default for PreflightStorageMissionAction {
4101    fn default() -> Self {
4102        Self::DEFAULT
4103    }
4104}
4105#[cfg_attr(feature = "ts", derive(TS))]
4106#[cfg_attr(feature = "ts", ts(export))]
4107#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4108#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4109#[cfg_attr(feature = "serde", serde(tag = "type"))]
4110#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4111#[repr(u32)]
4112#[doc = "Actions for reading/writing parameters between persistent and volatile storage when using MAV_CMD_PREFLIGHT_STORAGE.         (Commonly parameters are loaded from persistent storage (flash/EEPROM) into volatile storage (RAM) on startup and written back when they are changed.)"]
4113pub enum PreflightStorageParameterAction {
4114    #[doc = "Read all parameters from persistent storage. Replaces values in volatile storage."]
4115    PARAM_READ_PERSISTENT = 0,
4116    #[doc = "Write all parameter values to persistent storage (flash/EEPROM)"]
4117    PARAM_WRITE_PERSISTENT = 1,
4118    #[doc = "Reset all user configurable parameters to their default value (including airframe selection, sensor calibration data, safety settings, and so on). Does not reset values that contain operation counters and vehicle computed statistics."]
4119    PARAM_RESET_CONFIG_DEFAULT = 2,
4120    #[doc = "Reset only sensor calibration parameters to factory defaults (or firmware default if not available)"]
4121    PARAM_RESET_SENSOR_DEFAULT = 3,
4122    #[doc = "Reset all parameters, including operation counters, to default values"]
4123    PARAM_RESET_ALL_DEFAULT = 4,
4124}
4125impl PreflightStorageParameterAction {
4126    pub const DEFAULT: Self = Self::PARAM_READ_PERSISTENT;
4127}
4128impl Default for PreflightStorageParameterAction {
4129    fn default() -> Self {
4130        Self::DEFAULT
4131    }
4132}
4133#[cfg_attr(feature = "ts", derive(TS))]
4134#[cfg_attr(feature = "ts", ts(export))]
4135#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4136#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4137#[cfg_attr(feature = "serde", serde(tag = "type"))]
4138#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4139#[repr(u32)]
4140#[doc = "RC sub-type of types defined in RC_TYPE. Used in MAV_CMD_START_RX_PAIR. Ignored if value does not correspond to the set RC_TYPE."]
4141pub enum RcSubType {
4142    #[doc = "Spektrum DSM2"]
4143    RC_SUB_TYPE_SPEKTRUM_DSM2 = 0,
4144    #[doc = "Spektrum DSMX"]
4145    RC_SUB_TYPE_SPEKTRUM_DSMX = 1,
4146    #[doc = "Spektrum DSMX8"]
4147    RC_SUB_TYPE_SPEKTRUM_DSMX8 = 2,
4148}
4149impl RcSubType {
4150    pub const DEFAULT: Self = Self::RC_SUB_TYPE_SPEKTRUM_DSM2;
4151}
4152impl Default for RcSubType {
4153    fn default() -> Self {
4154        Self::DEFAULT
4155    }
4156}
4157#[cfg_attr(feature = "ts", derive(TS))]
4158#[cfg_attr(feature = "ts", ts(export))]
4159#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4160#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4161#[cfg_attr(feature = "serde", serde(tag = "type"))]
4162#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4163#[repr(u32)]
4164#[doc = "RC type. Used in MAV_CMD_START_RX_PAIR."]
4165pub enum RcType {
4166    #[doc = "Spektrum"]
4167    RC_TYPE_SPEKTRUM = 0,
4168    #[doc = "CRSF"]
4169    RC_TYPE_CRSF = 1,
4170}
4171impl RcType {
4172    pub const DEFAULT: Self = Self::RC_TYPE_SPEKTRUM;
4173}
4174impl Default for RcType {
4175    fn default() -> Self {
4176        Self::DEFAULT
4177    }
4178}
4179#[cfg_attr(feature = "ts", derive(TS))]
4180#[cfg_attr(feature = "ts", ts(export))]
4181#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4182#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4183#[cfg_attr(feature = "serde", serde(tag = "type"))]
4184#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4185#[repr(u32)]
4186#[doc = "Specifies the conditions under which the MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN command should be accepted."]
4187pub enum RebootShutdownConditions {
4188    #[doc = "Reboot/Shutdown only if allowed by safety checks, such as being landed."]
4189    REBOOT_SHUTDOWN_CONDITIONS_SAFETY_INTERLOCKED = 0,
4190    #[doc = "Force reboot/shutdown of the autopilot/component regardless of system state."]
4191    REBOOT_SHUTDOWN_CONDITIONS_FORCE = 20190226,
4192}
4193impl RebootShutdownConditions {
4194    pub const DEFAULT: Self = Self::REBOOT_SHUTDOWN_CONDITIONS_SAFETY_INTERLOCKED;
4195}
4196impl Default for RebootShutdownConditions {
4197    fn default() -> Self {
4198        Self::DEFAULT
4199    }
4200}
4201#[cfg_attr(feature = "ts", derive(TS))]
4202#[cfg_attr(feature = "ts", ts(export))]
4203#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4204#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4205#[cfg_attr(feature = "serde", serde(tag = "type"))]
4206#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4207#[repr(u32)]
4208#[doc = "RTK GPS baseline coordinate system, used for RTK corrections"]
4209pub enum RtkBaselineCoordinateSystem {
4210    #[doc = "Earth-centered, Earth-fixed"]
4211    RTK_BASELINE_COORDINATE_SYSTEM_ECEF = 0,
4212    #[doc = "RTK basestation centered, north, east, down"]
4213    RTK_BASELINE_COORDINATE_SYSTEM_NED = 1,
4214}
4215impl RtkBaselineCoordinateSystem {
4216    pub const DEFAULT: Self = Self::RTK_BASELINE_COORDINATE_SYSTEM_ECEF;
4217}
4218impl Default for RtkBaselineCoordinateSystem {
4219    fn default() -> Self {
4220        Self::DEFAULT
4221    }
4222}
4223#[cfg_attr(feature = "ts", derive(TS))]
4224#[cfg_attr(feature = "ts", ts(export))]
4225#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4226#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4227#[cfg_attr(feature = "serde", serde(tag = "type"))]
4228#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4229#[repr(u32)]
4230#[doc = "Possible safety switch states."]
4231pub enum SafetySwitchState {
4232    #[doc = "Safety switch is engaged and vehicle should be safe to approach."]
4233    SAFETY_SWITCH_STATE_SAFE = 0,
4234    #[doc = "Safety switch is NOT engaged and motors, propellers and other actuators should be considered active."]
4235    SAFETY_SWITCH_STATE_DANGEROUS = 1,
4236}
4237impl SafetySwitchState {
4238    pub const DEFAULT: Self = Self::SAFETY_SWITCH_STATE_SAFE;
4239}
4240impl Default for SafetySwitchState {
4241    fn default() -> Self {
4242        Self::DEFAULT
4243    }
4244}
4245#[cfg_attr(feature = "ts", derive(TS))]
4246#[cfg_attr(feature = "ts", ts(export))]
4247#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4248#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4249#[cfg_attr(feature = "serde", serde(tag = "type"))]
4250#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4251#[repr(u32)]
4252#[doc = "SERIAL_CONTROL device types"]
4253pub enum SerialControlDev {
4254    #[doc = "First telemetry port"]
4255    SERIAL_CONTROL_DEV_TELEM1 = 0,
4256    #[doc = "Second telemetry port"]
4257    SERIAL_CONTROL_DEV_TELEM2 = 1,
4258    #[doc = "First GPS port"]
4259    SERIAL_CONTROL_DEV_GPS1 = 2,
4260    #[doc = "Second GPS port"]
4261    SERIAL_CONTROL_DEV_GPS2 = 3,
4262    #[doc = "system shell"]
4263    SERIAL_CONTROL_DEV_SHELL = 10,
4264    #[doc = "SERIAL0"]
4265    SERIAL_CONTROL_SERIAL0 = 100,
4266    #[doc = "SERIAL1"]
4267    SERIAL_CONTROL_SERIAL1 = 101,
4268    #[doc = "SERIAL2"]
4269    SERIAL_CONTROL_SERIAL2 = 102,
4270    #[doc = "SERIAL3"]
4271    SERIAL_CONTROL_SERIAL3 = 103,
4272    #[doc = "SERIAL4"]
4273    SERIAL_CONTROL_SERIAL4 = 104,
4274    #[doc = "SERIAL5"]
4275    SERIAL_CONTROL_SERIAL5 = 105,
4276    #[doc = "SERIAL6"]
4277    SERIAL_CONTROL_SERIAL6 = 106,
4278    #[doc = "SERIAL7"]
4279    SERIAL_CONTROL_SERIAL7 = 107,
4280    #[doc = "SERIAL8"]
4281    SERIAL_CONTROL_SERIAL8 = 108,
4282    #[doc = "SERIAL9"]
4283    SERIAL_CONTROL_SERIAL9 = 109,
4284}
4285impl SerialControlDev {
4286    pub const DEFAULT: Self = Self::SERIAL_CONTROL_DEV_TELEM1;
4287}
4288impl Default for SerialControlDev {
4289    fn default() -> Self {
4290        Self::DEFAULT
4291    }
4292}
4293bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "SERIAL_CONTROL flags (bitmask)"] pub struct SerialControlFlag : u8 { # [doc = "Set if this is a reply"] const SERIAL_CONTROL_FLAG_REPLY = 1 ; # [doc = "Set if the sender wants the receiver to send a response as another SERIAL_CONTROL message"] const SERIAL_CONTROL_FLAG_RESPOND = 2 ; # [doc = "Set if access to the serial port should be removed from whatever driver is currently using it, giving exclusive access to the SERIAL_CONTROL protocol. The port can be handed back by sending a request without this flag set"] const SERIAL_CONTROL_FLAG_EXCLUSIVE = 4 ; # [doc = "Block on writes to the serial port"] const SERIAL_CONTROL_FLAG_BLOCKING = 8 ; # [doc = "Send multiple replies until port is drained"] const SERIAL_CONTROL_FLAG_MULTI = 16 ; } }
4294impl SerialControlFlag {
4295    pub const DEFAULT: Self = Self::SERIAL_CONTROL_FLAG_REPLY;
4296}
4297impl Default for SerialControlFlag {
4298    fn default() -> Self {
4299        Self::DEFAULT
4300    }
4301}
4302#[cfg_attr(feature = "ts", derive(TS))]
4303#[cfg_attr(feature = "ts", ts(export))]
4304#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4305#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4306#[cfg_attr(feature = "serde", serde(tag = "type"))]
4307#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4308#[repr(u32)]
4309#[doc = "Focus types for MAV_CMD_SET_CAMERA_FOCUS"]
4310pub enum SetFocusType {
4311    #[doc = "Focus one step increment (-1 for focusing in, 1 for focusing out towards infinity)."]
4312    FOCUS_TYPE_STEP = 0,
4313    #[doc = "Continuous normalized focus in/out rate until stopped. Range -1..1, negative: in, positive: out towards infinity, 0 to stop focusing. Other values should be clipped to the range."]
4314    FOCUS_TYPE_CONTINUOUS = 1,
4315    #[doc = "Focus value as proportion of full camera focus range (a value between 0.0 and 100.0)"]
4316    FOCUS_TYPE_RANGE = 2,
4317    #[doc = "Focus value in metres. Note that there is no message to get the valid focus range of the camera, so this can type can only be used for cameras where the range is known (implying that this cannot reliably be used in a GCS for an arbitrary camera)."]
4318    FOCUS_TYPE_METERS = 3,
4319    #[doc = "Focus automatically."]
4320    FOCUS_TYPE_AUTO = 4,
4321    #[doc = "Single auto focus. Mainly used for still pictures. Usually abbreviated as AF-S."]
4322    FOCUS_TYPE_AUTO_SINGLE = 5,
4323    #[doc = "Continuous auto focus. Mainly used for dynamic scenes. Abbreviated as AF-C."]
4324    FOCUS_TYPE_AUTO_CONTINUOUS = 6,
4325}
4326impl SetFocusType {
4327    pub const DEFAULT: Self = Self::FOCUS_TYPE_STEP;
4328}
4329impl Default for SetFocusType {
4330    fn default() -> Self {
4331        Self::DEFAULT
4332    }
4333}
4334#[cfg_attr(feature = "ts", derive(TS))]
4335#[cfg_attr(feature = "ts", ts(export))]
4336#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4337#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4338#[cfg_attr(feature = "serde", serde(tag = "type"))]
4339#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4340#[repr(u32)]
4341#[doc = "Speed setpoint types used in MAV_CMD_DO_CHANGE_SPEED"]
4342pub enum SpeedType {
4343    #[doc = "Airspeed"]
4344    SPEED_TYPE_AIRSPEED = 0,
4345    #[doc = "Groundspeed"]
4346    SPEED_TYPE_GROUNDSPEED = 1,
4347    #[doc = "Climb speed"]
4348    SPEED_TYPE_CLIMB_SPEED = 2,
4349    #[doc = "Descent speed"]
4350    SPEED_TYPE_DESCENT_SPEED = 3,
4351}
4352impl SpeedType {
4353    pub const DEFAULT: Self = Self::SPEED_TYPE_AIRSPEED;
4354}
4355impl Default for SpeedType {
4356    fn default() -> Self {
4357        Self::DEFAULT
4358    }
4359}
4360#[cfg_attr(feature = "ts", derive(TS))]
4361#[cfg_attr(feature = "ts", ts(export))]
4362#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4363#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4364#[cfg_attr(feature = "serde", serde(tag = "type"))]
4365#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4366#[repr(u32)]
4367#[doc = "Flags to indicate the status of camera storage."]
4368pub enum StorageStatus {
4369    #[doc = "Storage is missing (no microSD card loaded for example.)"]
4370    STORAGE_STATUS_EMPTY = 0,
4371    #[doc = "Storage present but unformatted."]
4372    STORAGE_STATUS_UNFORMATTED = 1,
4373    #[doc = "Storage present and ready."]
4374    STORAGE_STATUS_READY = 2,
4375    #[doc = "Camera does not supply storage status information. Capacity information in STORAGE_INFORMATION fields will be ignored."]
4376    STORAGE_STATUS_NOT_SUPPORTED = 3,
4377}
4378impl StorageStatus {
4379    pub const DEFAULT: Self = Self::STORAGE_STATUS_EMPTY;
4380}
4381impl Default for StorageStatus {
4382    fn default() -> Self {
4383        Self::DEFAULT
4384    }
4385}
4386#[cfg_attr(feature = "ts", derive(TS))]
4387#[cfg_attr(feature = "ts", ts(export))]
4388#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4389#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4390#[cfg_attr(feature = "serde", serde(tag = "type"))]
4391#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4392#[repr(u32)]
4393#[doc = "Flags to indicate the type of storage."]
4394pub enum StorageType {
4395    #[doc = "Storage type is not known."]
4396    STORAGE_TYPE_UNKNOWN = 0,
4397    #[doc = "Storage type is USB device."]
4398    STORAGE_TYPE_USB_STICK = 1,
4399    #[doc = "Storage type is SD card."]
4400    STORAGE_TYPE_SD = 2,
4401    #[doc = "Storage type is microSD card."]
4402    STORAGE_TYPE_MICROSD = 3,
4403    #[doc = "Storage type is CFast."]
4404    STORAGE_TYPE_CF = 4,
4405    #[doc = "Storage type is CFexpress."]
4406    STORAGE_TYPE_CFE = 5,
4407    #[doc = "Storage type is XQD."]
4408    STORAGE_TYPE_XQD = 6,
4409    #[doc = "Storage type is HD mass storage type."]
4410    STORAGE_TYPE_HD = 7,
4411    #[doc = "Storage type is other, not listed type."]
4412    STORAGE_TYPE_OTHER = 254,
4413}
4414impl StorageType {
4415    pub const DEFAULT: Self = Self::STORAGE_TYPE_UNKNOWN;
4416}
4417impl Default for StorageType {
4418    fn default() -> Self {
4419        Self::DEFAULT
4420    }
4421}
4422bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to indicate usage for a particular storage (see STORAGE_INFORMATION.storage_usage and MAV_CMD_SET_STORAGE_USAGE)."] pub struct StorageUsageFlag : u8 { # [doc = "Always set to 1 (indicates STORAGE_INFORMATION.storage_usage is supported)."] const STORAGE_USAGE_FLAG_SET = 1 ; # [doc = "Storage for saving photos."] const STORAGE_USAGE_FLAG_PHOTO = 2 ; # [doc = "Storage for saving videos."] const STORAGE_USAGE_FLAG_VIDEO = 4 ; # [doc = "Storage for saving logs."] const STORAGE_USAGE_FLAG_LOGS = 8 ; } }
4423impl StorageUsageFlag {
4424    pub const DEFAULT: Self = Self::STORAGE_USAGE_FLAG_SET;
4425}
4426impl Default for StorageUsageFlag {
4427    fn default() -> Self {
4428        Self::DEFAULT
4429    }
4430}
4431#[cfg_attr(feature = "ts", derive(TS))]
4432#[cfg_attr(feature = "ts", ts(export))]
4433#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4434#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4435#[cfg_attr(feature = "serde", serde(tag = "type"))]
4436#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4437#[repr(u32)]
4438#[doc = "Tune formats (used for vehicle buzzer/tone generation)."]
4439pub enum TuneFormat {
4440    #[doc = "Format is QBasic 1.1 Play: <https://www.qbasic.net/en/reference/qb11/Statement/PLAY-006.htm>."]
4441    TUNE_FORMAT_QBASIC1_1 = 1,
4442    #[doc = "Format is Modern Music Markup Language (MML): <https://en.wikipedia.org/wiki/Music_Macro_Language#Modern_MML>."]
4443    TUNE_FORMAT_MML_MODERN = 2,
4444}
4445impl TuneFormat {
4446    pub const DEFAULT: Self = Self::TUNE_FORMAT_QBASIC1_1;
4447}
4448impl Default for TuneFormat {
4449    fn default() -> Self {
4450        Self::DEFAULT
4451    }
4452}
4453#[cfg_attr(feature = "ts", derive(TS))]
4454#[cfg_attr(feature = "ts", ts(export))]
4455#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4456#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4457#[cfg_attr(feature = "serde", serde(tag = "type"))]
4458#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4459#[repr(u32)]
4460#[doc = "Generalized UAVCAN node health"]
4461pub enum UavcanNodeHealth {
4462    #[doc = "The node is functioning properly."]
4463    UAVCAN_NODE_HEALTH_OK = 0,
4464    #[doc = "A critical parameter went out of range or the node has encountered a minor failure."]
4465    UAVCAN_NODE_HEALTH_WARNING = 1,
4466    #[doc = "The node has encountered a major failure."]
4467    UAVCAN_NODE_HEALTH_ERROR = 2,
4468    #[doc = "The node has suffered a fatal malfunction."]
4469    UAVCAN_NODE_HEALTH_CRITICAL = 3,
4470}
4471impl UavcanNodeHealth {
4472    pub const DEFAULT: Self = Self::UAVCAN_NODE_HEALTH_OK;
4473}
4474impl Default for UavcanNodeHealth {
4475    fn default() -> Self {
4476        Self::DEFAULT
4477    }
4478}
4479#[cfg_attr(feature = "ts", derive(TS))]
4480#[cfg_attr(feature = "ts", ts(export))]
4481#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4482#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4483#[cfg_attr(feature = "serde", serde(tag = "type"))]
4484#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4485#[repr(u32)]
4486#[doc = "Generalized UAVCAN node mode"]
4487pub enum UavcanNodeMode {
4488    #[doc = "The node is performing its primary functions."]
4489    UAVCAN_NODE_MODE_OPERATIONAL = 0,
4490    #[doc = "The node is initializing; this mode is entered immediately after startup."]
4491    UAVCAN_NODE_MODE_INITIALIZATION = 1,
4492    #[doc = "The node is under maintenance."]
4493    UAVCAN_NODE_MODE_MAINTENANCE = 2,
4494    #[doc = "The node is in the process of updating its software."]
4495    UAVCAN_NODE_MODE_SOFTWARE_UPDATE = 3,
4496    #[doc = "The node is no longer available online."]
4497    UAVCAN_NODE_MODE_OFFLINE = 7,
4498}
4499impl UavcanNodeMode {
4500    pub const DEFAULT: Self = Self::UAVCAN_NODE_MODE_OPERATIONAL;
4501}
4502impl Default for UavcanNodeMode {
4503    fn default() -> Self {
4504        Self::DEFAULT
4505    }
4506}
4507bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for the global position report."] pub struct UtmDataAvailFlags : u8 { # [doc = "The field time contains valid data."] const UTM_DATA_AVAIL_FLAGS_TIME_VALID = 1 ; # [doc = "The field uas_id contains valid data."] const UTM_DATA_AVAIL_FLAGS_UAS_ID_AVAILABLE = 2 ; # [doc = "The fields lat, lon and h_acc contain valid data."] const UTM_DATA_AVAIL_FLAGS_POSITION_AVAILABLE = 4 ; # [doc = "The fields alt and v_acc contain valid data."] const UTM_DATA_AVAIL_FLAGS_ALTITUDE_AVAILABLE = 8 ; # [doc = "The field relative_alt contains valid data."] const UTM_DATA_AVAIL_FLAGS_RELATIVE_ALTITUDE_AVAILABLE = 16 ; # [doc = "The fields vx and vy contain valid data."] const UTM_DATA_AVAIL_FLAGS_HORIZONTAL_VELO_AVAILABLE = 32 ; # [doc = "The field vz contains valid data."] const UTM_DATA_AVAIL_FLAGS_VERTICAL_VELO_AVAILABLE = 64 ; # [doc = "The fields next_lat, next_lon and next_alt contain valid data."] const UTM_DATA_AVAIL_FLAGS_NEXT_WAYPOINT_AVAILABLE = 128 ; } }
4508impl UtmDataAvailFlags {
4509    pub const DEFAULT: Self = Self::UTM_DATA_AVAIL_FLAGS_TIME_VALID;
4510}
4511impl Default for UtmDataAvailFlags {
4512    fn default() -> Self {
4513        Self::DEFAULT
4514    }
4515}
4516#[cfg_attr(feature = "ts", derive(TS))]
4517#[cfg_attr(feature = "ts", ts(export))]
4518#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4519#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4520#[cfg_attr(feature = "serde", serde(tag = "type"))]
4521#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4522#[repr(u32)]
4523#[doc = "Airborne status of UAS."]
4524pub enum UtmFlightState {
4525    #[doc = "The flight state can't be determined."]
4526    UTM_FLIGHT_STATE_UNKNOWN = 1,
4527    #[doc = "UAS on ground."]
4528    UTM_FLIGHT_STATE_GROUND = 2,
4529    #[doc = "UAS airborne."]
4530    UTM_FLIGHT_STATE_AIRBORNE = 3,
4531    #[doc = "UAS is in an emergency flight state."]
4532    UTM_FLIGHT_STATE_EMERGENCY = 16,
4533    #[doc = "UAS has no active controls."]
4534    UTM_FLIGHT_STATE_NOCTRL = 32,
4535}
4536impl UtmFlightState {
4537    pub const DEFAULT: Self = Self::UTM_FLIGHT_STATE_UNKNOWN;
4538}
4539impl Default for UtmFlightState {
4540    fn default() -> Self {
4541        Self::DEFAULT
4542    }
4543}
4544#[cfg_attr(feature = "ts", derive(TS))]
4545#[cfg_attr(feature = "ts", ts(export))]
4546#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4547#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4548#[cfg_attr(feature = "serde", serde(tag = "type"))]
4549#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4550#[repr(u32)]
4551#[doc = "Video stream encodings"]
4552pub enum VideoStreamEncoding {
4553    #[doc = "Stream encoding is unknown"]
4554    VIDEO_STREAM_ENCODING_UNKNOWN = 0,
4555    #[doc = "Stream encoding is H.264"]
4556    VIDEO_STREAM_ENCODING_H264 = 1,
4557    #[doc = "Stream encoding is H.265"]
4558    VIDEO_STREAM_ENCODING_H265 = 2,
4559}
4560impl VideoStreamEncoding {
4561    pub const DEFAULT: Self = Self::VIDEO_STREAM_ENCODING_UNKNOWN;
4562}
4563impl Default for VideoStreamEncoding {
4564    fn default() -> Self {
4565        Self::DEFAULT
4566    }
4567}
4568bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Stream status flags (Bitmap)"] pub struct VideoStreamStatusFlags : u16 { # [doc = "Stream is active (running)"] const VIDEO_STREAM_STATUS_FLAGS_RUNNING = 1 ; # [doc = "Stream is thermal imaging"] const VIDEO_STREAM_STATUS_FLAGS_THERMAL = 2 ; # [doc = "Stream can report absolute thermal range (see CAMERA_THERMAL_RANGE)."] const VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED = 4 ; } }
4569impl VideoStreamStatusFlags {
4570    pub const DEFAULT: Self = Self::VIDEO_STREAM_STATUS_FLAGS_RUNNING;
4571}
4572impl Default for VideoStreamStatusFlags {
4573    fn default() -> Self {
4574        Self::DEFAULT
4575    }
4576}
4577#[cfg_attr(feature = "ts", derive(TS))]
4578#[cfg_attr(feature = "ts", ts(export))]
4579#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4580#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4581#[cfg_attr(feature = "serde", serde(tag = "type"))]
4582#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4583#[repr(u32)]
4584#[doc = "Video stream types"]
4585pub enum VideoStreamType {
4586    #[doc = "Stream is RTSP"]
4587    VIDEO_STREAM_TYPE_RTSP = 0,
4588    #[doc = "Stream is RTP UDP (URI gives the port number)"]
4589    VIDEO_STREAM_TYPE_RTPUDP = 1,
4590    #[doc = "Stream is MPEG on TCP"]
4591    VIDEO_STREAM_TYPE_TCP_MPEG = 2,
4592    #[doc = "Stream is MPEG TS (URI gives the port number)"]
4593    VIDEO_STREAM_TYPE_MPEG_TS = 3,
4594}
4595impl VideoStreamType {
4596    pub const DEFAULT: Self = Self::VIDEO_STREAM_TYPE_RTSP;
4597}
4598impl Default for VideoStreamType {
4599    fn default() -> Self {
4600        Self::DEFAULT
4601    }
4602}
4603#[cfg_attr(feature = "ts", derive(TS))]
4604#[cfg_attr(feature = "ts", ts(export))]
4605#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4606#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4607#[cfg_attr(feature = "serde", serde(tag = "type"))]
4608#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4609#[repr(u32)]
4610#[doc = "Direction of VTOL transition"]
4611pub enum VtolTransitionHeading {
4612    #[doc = "Respect the heading configuration of the vehicle."]
4613    VTOL_TRANSITION_HEADING_VEHICLE_DEFAULT = 0,
4614    #[doc = "Use the heading pointing towards the next waypoint."]
4615    VTOL_TRANSITION_HEADING_NEXT_WAYPOINT = 1,
4616    #[doc = "Use the heading on takeoff (while sitting on the ground)."]
4617    VTOL_TRANSITION_HEADING_TAKEOFF = 2,
4618    #[doc = "Use the specified heading in parameter 4."]
4619    VTOL_TRANSITION_HEADING_SPECIFIED = 3,
4620    #[doc = "Use the current heading when reaching takeoff altitude (potentially facing the wind when weather-vaning is active)."]
4621    VTOL_TRANSITION_HEADING_ANY = 4,
4622}
4623impl VtolTransitionHeading {
4624    pub const DEFAULT: Self = Self::VTOL_TRANSITION_HEADING_VEHICLE_DEFAULT;
4625}
4626impl Default for VtolTransitionHeading {
4627    fn default() -> Self {
4628        Self::DEFAULT
4629    }
4630}
4631#[cfg_attr(feature = "ts", derive(TS))]
4632#[cfg_attr(feature = "ts", ts(export))]
4633#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4634#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4635#[cfg_attr(feature = "serde", serde(tag = "type"))]
4636#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4637#[repr(u32)]
4638#[doc = "WiFi Mode."]
4639pub enum WifiConfigApMode {
4640    #[doc = "WiFi mode is undefined."]
4641    WIFI_CONFIG_AP_MODE_UNDEFINED = 0,
4642    #[doc = "WiFi configured as an access point."]
4643    WIFI_CONFIG_AP_MODE_AP = 1,
4644    #[doc = "WiFi configured as a station connected to an existing local WiFi network."]
4645    WIFI_CONFIG_AP_MODE_STATION = 2,
4646    #[doc = "WiFi disabled."]
4647    WIFI_CONFIG_AP_MODE_DISABLED = 3,
4648}
4649impl WifiConfigApMode {
4650    pub const DEFAULT: Self = Self::WIFI_CONFIG_AP_MODE_UNDEFINED;
4651}
4652impl Default for WifiConfigApMode {
4653    fn default() -> Self {
4654        Self::DEFAULT
4655    }
4656}
4657#[cfg_attr(feature = "ts", derive(TS))]
4658#[cfg_attr(feature = "ts", ts(export))]
4659#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4660#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4661#[cfg_attr(feature = "serde", serde(tag = "type"))]
4662#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4663#[repr(u32)]
4664#[doc = "Possible responses from a WIFI_CONFIG_AP message."]
4665pub enum WifiConfigApResponse {
4666    #[doc = "Undefined response. Likely an indicative of a system that doesn't support this request."]
4667    WIFI_CONFIG_AP_RESPONSE_UNDEFINED = 0,
4668    #[doc = "Changes accepted."]
4669    WIFI_CONFIG_AP_RESPONSE_ACCEPTED = 1,
4670    #[doc = "Changes rejected."]
4671    WIFI_CONFIG_AP_RESPONSE_REJECTED = 2,
4672    #[doc = "Invalid Mode."]
4673    WIFI_CONFIG_AP_RESPONSE_MODE_ERROR = 3,
4674    #[doc = "Invalid SSID."]
4675    WIFI_CONFIG_AP_RESPONSE_SSID_ERROR = 4,
4676    #[doc = "Invalid Password."]
4677    WIFI_CONFIG_AP_RESPONSE_PASSWORD_ERROR = 5,
4678}
4679impl WifiConfigApResponse {
4680    pub const DEFAULT: Self = Self::WIFI_CONFIG_AP_RESPONSE_UNDEFINED;
4681}
4682impl Default for WifiConfigApResponse {
4683    fn default() -> Self {
4684        Self::DEFAULT
4685    }
4686}
4687#[cfg_attr(feature = "ts", derive(TS))]
4688#[cfg_attr(feature = "ts", ts(export))]
4689#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4690#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4691#[cfg_attr(feature = "serde", serde(tag = "type"))]
4692#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4693#[repr(u32)]
4694#[doc = "Winch actions."]
4695pub enum WinchActions {
4696    #[doc = "Allow motor to freewheel."]
4697    WINCH_RELAXED = 0,
4698    #[doc = "Wind or unwind specified length of line, optionally using specified rate."]
4699    WINCH_RELATIVE_LENGTH_CONTROL = 1,
4700    #[doc = "Wind or unwind line at specified rate."]
4701    WINCH_RATE_CONTROL = 2,
4702    #[doc = "Perform the locking sequence to relieve motor while in the fully retracted position. Only action and instance command parameters are used, others are ignored."]
4703    WINCH_LOCK = 3,
4704    #[doc = "Sequence of drop, slow down, touch down, reel up, lock. Only action and instance command parameters are used, others are ignored."]
4705    WINCH_DELIVER = 4,
4706    #[doc = "Engage motor and hold current position. Only action and instance command parameters are used, others are ignored."]
4707    WINCH_HOLD = 5,
4708    #[doc = "Return the reel to the fully retracted position. Only action and instance command parameters are used, others are ignored."]
4709    WINCH_RETRACT = 6,
4710    #[doc = "Load the reel with line. The winch will calculate the total loaded length and stop when the tension exceeds a threshold. Only action and instance command parameters are used, others are ignored."]
4711    WINCH_LOAD_LINE = 7,
4712    #[doc = "Spool out the entire length of the line. Only action and instance command parameters are used, others are ignored."]
4713    WINCH_ABANDON_LINE = 8,
4714    #[doc = "Spools out just enough to present the hook to the user to load the payload. Only action and instance command parameters are used, others are ignored"]
4715    WINCH_LOAD_PAYLOAD = 9,
4716}
4717impl WinchActions {
4718    pub const DEFAULT: Self = Self::WINCH_RELAXED;
4719}
4720impl Default for WinchActions {
4721    fn default() -> Self {
4722        Self::DEFAULT
4723    }
4724}
4725#[doc = "Set the vehicle attitude and body angular rates."]
4726#[doc = ""]
4727#[doc = "ID: 140"]
4728#[derive(Debug, Clone, PartialEq)]
4729#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4730#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4731#[cfg_attr(feature = "ts", derive(TS))]
4732#[cfg_attr(feature = "ts", ts(export))]
4733pub struct ACTUATOR_CONTROL_TARGET_DATA {
4734    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
4735    pub time_usec: u64,
4736    #[doc = "Actuator controls. Normed to -1..+1 where 0 is neutral position. Throttle for single rotation direction motors is 0..1, negative range for reverse direction. Standard mapping for attitude controls (group 0): (index 0-7): roll, pitch, yaw, throttle, flaps, spoilers, airbrakes, landing gear. Load a pass-through mixer to repurpose them as generic outputs."]
4737    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4738    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
4739    pub controls: [f32; 8],
4740    #[doc = "Actuator group. The \"_mlx\" indicates this is a multi-instance message and a MAVLink parser should use this field to difference between instances."]
4741    pub group_mlx: u8,
4742}
4743impl ACTUATOR_CONTROL_TARGET_DATA {
4744    pub const ENCODED_LEN: usize = 41usize;
4745    pub const DEFAULT: Self = Self {
4746        time_usec: 0_u64,
4747        controls: [0.0_f32; 8usize],
4748        group_mlx: 0_u8,
4749    };
4750    #[cfg(feature = "arbitrary")]
4751    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4752        use arbitrary::{Arbitrary, Unstructured};
4753        let mut buf = [0u8; 1024];
4754        rng.fill_bytes(&mut buf);
4755        let mut unstructured = Unstructured::new(&buf);
4756        Self::arbitrary(&mut unstructured).unwrap_or_default()
4757    }
4758}
4759impl Default for ACTUATOR_CONTROL_TARGET_DATA {
4760    fn default() -> Self {
4761        Self::DEFAULT.clone()
4762    }
4763}
4764impl MessageData for ACTUATOR_CONTROL_TARGET_DATA {
4765    type Message = MavMessage;
4766    const ID: u32 = 140u32;
4767    const NAME: &'static str = "ACTUATOR_CONTROL_TARGET";
4768    const EXTRA_CRC: u8 = 181u8;
4769    const ENCODED_LEN: usize = 41usize;
4770    fn deser(
4771        _version: MavlinkVersion,
4772        __input: &[u8],
4773    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4774        let avail_len = __input.len();
4775        let mut payload_buf = [0; Self::ENCODED_LEN];
4776        let mut buf = if avail_len < Self::ENCODED_LEN {
4777            payload_buf[0..avail_len].copy_from_slice(__input);
4778            Bytes::new(&payload_buf)
4779        } else {
4780            Bytes::new(__input)
4781        };
4782        let mut __struct = Self::default();
4783        __struct.time_usec = buf.get_u64_le();
4784        for v in &mut __struct.controls {
4785            let val = buf.get_f32_le();
4786            *v = val;
4787        }
4788        __struct.group_mlx = buf.get_u8();
4789        Ok(__struct)
4790    }
4791    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4792        let mut __tmp = BytesMut::new(bytes);
4793        #[allow(clippy::absurd_extreme_comparisons)]
4794        #[allow(unused_comparisons)]
4795        if __tmp.remaining() < Self::ENCODED_LEN {
4796            panic!(
4797                "buffer is too small (need {} bytes, but got {})",
4798                Self::ENCODED_LEN,
4799                __tmp.remaining(),
4800            )
4801        }
4802        __tmp.put_u64_le(self.time_usec);
4803        for val in &self.controls {
4804            __tmp.put_f32_le(*val);
4805        }
4806        __tmp.put_u8(self.group_mlx);
4807        if matches!(version, MavlinkVersion::V2) {
4808            let len = __tmp.len();
4809            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
4810        } else {
4811            __tmp.len()
4812        }
4813    }
4814}
4815#[doc = "The raw values of the actuator outputs (e.g. on Pixhawk, from MAIN, AUX ports). This message supersedes SERVO_OUTPUT_RAW."]
4816#[doc = ""]
4817#[doc = "ID: 375"]
4818#[derive(Debug, Clone, PartialEq)]
4819#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4820#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4821#[cfg_attr(feature = "ts", derive(TS))]
4822#[cfg_attr(feature = "ts", ts(export))]
4823pub struct ACTUATOR_OUTPUT_STATUS_DATA {
4824    #[doc = "Timestamp (since system boot)."]
4825    pub time_usec: u64,
4826    #[doc = "Active outputs"]
4827    pub active: u32,
4828    #[doc = "Servo / motor output array values. Zero values indicate unused channels."]
4829    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4830    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
4831    pub actuator: [f32; 32],
4832}
4833impl ACTUATOR_OUTPUT_STATUS_DATA {
4834    pub const ENCODED_LEN: usize = 140usize;
4835    pub const DEFAULT: Self = Self {
4836        time_usec: 0_u64,
4837        active: 0_u32,
4838        actuator: [0.0_f32; 32usize],
4839    };
4840    #[cfg(feature = "arbitrary")]
4841    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4842        use arbitrary::{Arbitrary, Unstructured};
4843        let mut buf = [0u8; 1024];
4844        rng.fill_bytes(&mut buf);
4845        let mut unstructured = Unstructured::new(&buf);
4846        Self::arbitrary(&mut unstructured).unwrap_or_default()
4847    }
4848}
4849impl Default for ACTUATOR_OUTPUT_STATUS_DATA {
4850    fn default() -> Self {
4851        Self::DEFAULT.clone()
4852    }
4853}
4854impl MessageData for ACTUATOR_OUTPUT_STATUS_DATA {
4855    type Message = MavMessage;
4856    const ID: u32 = 375u32;
4857    const NAME: &'static str = "ACTUATOR_OUTPUT_STATUS";
4858    const EXTRA_CRC: u8 = 251u8;
4859    const ENCODED_LEN: usize = 140usize;
4860    fn deser(
4861        _version: MavlinkVersion,
4862        __input: &[u8],
4863    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4864        let avail_len = __input.len();
4865        let mut payload_buf = [0; Self::ENCODED_LEN];
4866        let mut buf = if avail_len < Self::ENCODED_LEN {
4867            payload_buf[0..avail_len].copy_from_slice(__input);
4868            Bytes::new(&payload_buf)
4869        } else {
4870            Bytes::new(__input)
4871        };
4872        let mut __struct = Self::default();
4873        __struct.time_usec = buf.get_u64_le();
4874        __struct.active = buf.get_u32_le();
4875        for v in &mut __struct.actuator {
4876            let val = buf.get_f32_le();
4877            *v = val;
4878        }
4879        Ok(__struct)
4880    }
4881    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4882        let mut __tmp = BytesMut::new(bytes);
4883        #[allow(clippy::absurd_extreme_comparisons)]
4884        #[allow(unused_comparisons)]
4885        if __tmp.remaining() < Self::ENCODED_LEN {
4886            panic!(
4887                "buffer is too small (need {} bytes, but got {})",
4888                Self::ENCODED_LEN,
4889                __tmp.remaining(),
4890            )
4891        }
4892        __tmp.put_u64_le(self.time_usec);
4893        __tmp.put_u32_le(self.active);
4894        for val in &self.actuator {
4895            __tmp.put_f32_le(*val);
4896        }
4897        if matches!(version, MavlinkVersion::V2) {
4898            let len = __tmp.len();
4899            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
4900        } else {
4901            __tmp.len()
4902        }
4903    }
4904}
4905#[doc = "The location and information of an ADSB vehicle."]
4906#[doc = ""]
4907#[doc = "ID: 246"]
4908#[derive(Debug, Clone, PartialEq)]
4909#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4910#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4911#[cfg_attr(feature = "ts", derive(TS))]
4912#[cfg_attr(feature = "ts", ts(export))]
4913pub struct ADSB_VEHICLE_DATA {
4914    #[doc = "ICAO address"]
4915    pub ICAO_address: u32,
4916    #[doc = "Latitude"]
4917    pub lat: i32,
4918    #[doc = "Longitude"]
4919    pub lon: i32,
4920    #[doc = "Altitude(ASL)"]
4921    pub altitude: i32,
4922    #[doc = "Course over ground"]
4923    pub heading: u16,
4924    #[doc = "The horizontal velocity"]
4925    pub hor_velocity: u16,
4926    #[doc = "The vertical velocity. Positive is up"]
4927    pub ver_velocity: i16,
4928    #[doc = "Bitmap to indicate various statuses including valid data fields"]
4929    pub flags: AdsbFlags,
4930    #[doc = "Squawk code. Note that the code is in decimal: e.g. 7700 (general emergency) is encoded as binary 0b0001_1110_0001_0100, not(!) as 0b0000_111_111_000_000"]
4931    pub squawk: u16,
4932    #[doc = "ADSB altitude type."]
4933    pub altitude_type: AdsbAltitudeType,
4934    #[doc = "The callsign, 8+null"]
4935    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4936    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
4937    pub callsign: [u8; 9],
4938    #[doc = "ADSB emitter type."]
4939    pub emitter_type: AdsbEmitterType,
4940    #[doc = "Time since last communication in seconds"]
4941    pub tslc: u8,
4942}
4943impl ADSB_VEHICLE_DATA {
4944    pub const ENCODED_LEN: usize = 38usize;
4945    pub const DEFAULT: Self = Self {
4946        ICAO_address: 0_u32,
4947        lat: 0_i32,
4948        lon: 0_i32,
4949        altitude: 0_i32,
4950        heading: 0_u16,
4951        hor_velocity: 0_u16,
4952        ver_velocity: 0_i16,
4953        flags: AdsbFlags::DEFAULT,
4954        squawk: 0_u16,
4955        altitude_type: AdsbAltitudeType::DEFAULT,
4956        callsign: [0_u8; 9usize],
4957        emitter_type: AdsbEmitterType::DEFAULT,
4958        tslc: 0_u8,
4959    };
4960    #[cfg(feature = "arbitrary")]
4961    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4962        use arbitrary::{Arbitrary, Unstructured};
4963        let mut buf = [0u8; 1024];
4964        rng.fill_bytes(&mut buf);
4965        let mut unstructured = Unstructured::new(&buf);
4966        Self::arbitrary(&mut unstructured).unwrap_or_default()
4967    }
4968}
4969impl Default for ADSB_VEHICLE_DATA {
4970    fn default() -> Self {
4971        Self::DEFAULT.clone()
4972    }
4973}
4974impl MessageData for ADSB_VEHICLE_DATA {
4975    type Message = MavMessage;
4976    const ID: u32 = 246u32;
4977    const NAME: &'static str = "ADSB_VEHICLE";
4978    const EXTRA_CRC: u8 = 184u8;
4979    const ENCODED_LEN: usize = 38usize;
4980    fn deser(
4981        _version: MavlinkVersion,
4982        __input: &[u8],
4983    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4984        let avail_len = __input.len();
4985        let mut payload_buf = [0; Self::ENCODED_LEN];
4986        let mut buf = if avail_len < Self::ENCODED_LEN {
4987            payload_buf[0..avail_len].copy_from_slice(__input);
4988            Bytes::new(&payload_buf)
4989        } else {
4990            Bytes::new(__input)
4991        };
4992        let mut __struct = Self::default();
4993        __struct.ICAO_address = buf.get_u32_le();
4994        __struct.lat = buf.get_i32_le();
4995        __struct.lon = buf.get_i32_le();
4996        __struct.altitude = buf.get_i32_le();
4997        __struct.heading = buf.get_u16_le();
4998        __struct.hor_velocity = buf.get_u16_le();
4999        __struct.ver_velocity = buf.get_i16_le();
5000        let tmp = buf.get_u16_le();
5001        __struct.flags = AdsbFlags::from_bits(tmp & AdsbFlags::all().bits()).ok_or(
5002            ::mavlink_core::error::ParserError::InvalidFlag {
5003                flag_type: "AdsbFlags",
5004                value: tmp as u32,
5005            },
5006        )?;
5007        __struct.squawk = buf.get_u16_le();
5008        let tmp = buf.get_u8();
5009        __struct.altitude_type =
5010            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5011                enum_type: "AdsbAltitudeType",
5012                value: tmp as u32,
5013            })?;
5014        for v in &mut __struct.callsign {
5015            let val = buf.get_u8();
5016            *v = val;
5017        }
5018        let tmp = buf.get_u8();
5019        __struct.emitter_type =
5020            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5021                enum_type: "AdsbEmitterType",
5022                value: tmp as u32,
5023            })?;
5024        __struct.tslc = buf.get_u8();
5025        Ok(__struct)
5026    }
5027    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5028        let mut __tmp = BytesMut::new(bytes);
5029        #[allow(clippy::absurd_extreme_comparisons)]
5030        #[allow(unused_comparisons)]
5031        if __tmp.remaining() < Self::ENCODED_LEN {
5032            panic!(
5033                "buffer is too small (need {} bytes, but got {})",
5034                Self::ENCODED_LEN,
5035                __tmp.remaining(),
5036            )
5037        }
5038        __tmp.put_u32_le(self.ICAO_address);
5039        __tmp.put_i32_le(self.lat);
5040        __tmp.put_i32_le(self.lon);
5041        __tmp.put_i32_le(self.altitude);
5042        __tmp.put_u16_le(self.heading);
5043        __tmp.put_u16_le(self.hor_velocity);
5044        __tmp.put_i16_le(self.ver_velocity);
5045        __tmp.put_u16_le(self.flags.bits());
5046        __tmp.put_u16_le(self.squawk);
5047        __tmp.put_u8(self.altitude_type as u8);
5048        for val in &self.callsign {
5049            __tmp.put_u8(*val);
5050        }
5051        __tmp.put_u8(self.emitter_type as u8);
5052        __tmp.put_u8(self.tslc);
5053        if matches!(version, MavlinkVersion::V2) {
5054            let len = __tmp.len();
5055            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5056        } else {
5057            __tmp.len()
5058        }
5059    }
5060}
5061#[doc = "The location and information of an AIS vessel."]
5062#[doc = ""]
5063#[doc = "ID: 301"]
5064#[derive(Debug, Clone, PartialEq)]
5065#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5066#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5067#[cfg_attr(feature = "ts", derive(TS))]
5068#[cfg_attr(feature = "ts", ts(export))]
5069pub struct AIS_VESSEL_DATA {
5070    #[doc = "Mobile Marine Service Identifier, 9 decimal digits"]
5071    pub MMSI: u32,
5072    #[doc = "Latitude"]
5073    pub lat: i32,
5074    #[doc = "Longitude"]
5075    pub lon: i32,
5076    #[doc = "Course over ground"]
5077    pub COG: u16,
5078    #[doc = "True heading"]
5079    pub heading: u16,
5080    #[doc = "Speed over ground"]
5081    pub velocity: u16,
5082    #[doc = "Distance from lat/lon location to bow"]
5083    pub dimension_bow: u16,
5084    #[doc = "Distance from lat/lon location to stern"]
5085    pub dimension_stern: u16,
5086    #[doc = "Time since last communication in seconds"]
5087    pub tslc: u16,
5088    #[doc = "Bitmask to indicate various statuses including valid data fields"]
5089    pub flags: AisFlags,
5090    #[doc = "Turn rate"]
5091    pub turn_rate: i8,
5092    #[doc = "Navigational status"]
5093    pub navigational_status: AisNavStatus,
5094    #[doc = "Type of vessels"]
5095    pub mavtype: AisType,
5096    #[doc = "Distance from lat/lon location to port side"]
5097    pub dimension_port: u8,
5098    #[doc = "Distance from lat/lon location to starboard side"]
5099    pub dimension_starboard: u8,
5100    #[doc = "The vessel callsign"]
5101    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5102    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5103    pub callsign: [u8; 7],
5104    #[doc = "The vessel name"]
5105    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5106    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5107    pub name: [u8; 20],
5108}
5109impl AIS_VESSEL_DATA {
5110    pub const ENCODED_LEN: usize = 58usize;
5111    pub const DEFAULT: Self = Self {
5112        MMSI: 0_u32,
5113        lat: 0_i32,
5114        lon: 0_i32,
5115        COG: 0_u16,
5116        heading: 0_u16,
5117        velocity: 0_u16,
5118        dimension_bow: 0_u16,
5119        dimension_stern: 0_u16,
5120        tslc: 0_u16,
5121        flags: AisFlags::DEFAULT,
5122        turn_rate: 0_i8,
5123        navigational_status: AisNavStatus::DEFAULT,
5124        mavtype: AisType::DEFAULT,
5125        dimension_port: 0_u8,
5126        dimension_starboard: 0_u8,
5127        callsign: [0_u8; 7usize],
5128        name: [0_u8; 20usize],
5129    };
5130    #[cfg(feature = "arbitrary")]
5131    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5132        use arbitrary::{Arbitrary, Unstructured};
5133        let mut buf = [0u8; 1024];
5134        rng.fill_bytes(&mut buf);
5135        let mut unstructured = Unstructured::new(&buf);
5136        Self::arbitrary(&mut unstructured).unwrap_or_default()
5137    }
5138}
5139impl Default for AIS_VESSEL_DATA {
5140    fn default() -> Self {
5141        Self::DEFAULT.clone()
5142    }
5143}
5144impl MessageData for AIS_VESSEL_DATA {
5145    type Message = MavMessage;
5146    const ID: u32 = 301u32;
5147    const NAME: &'static str = "AIS_VESSEL";
5148    const EXTRA_CRC: u8 = 243u8;
5149    const ENCODED_LEN: usize = 58usize;
5150    fn deser(
5151        _version: MavlinkVersion,
5152        __input: &[u8],
5153    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5154        let avail_len = __input.len();
5155        let mut payload_buf = [0; Self::ENCODED_LEN];
5156        let mut buf = if avail_len < Self::ENCODED_LEN {
5157            payload_buf[0..avail_len].copy_from_slice(__input);
5158            Bytes::new(&payload_buf)
5159        } else {
5160            Bytes::new(__input)
5161        };
5162        let mut __struct = Self::default();
5163        __struct.MMSI = buf.get_u32_le();
5164        __struct.lat = buf.get_i32_le();
5165        __struct.lon = buf.get_i32_le();
5166        __struct.COG = buf.get_u16_le();
5167        __struct.heading = buf.get_u16_le();
5168        __struct.velocity = buf.get_u16_le();
5169        __struct.dimension_bow = buf.get_u16_le();
5170        __struct.dimension_stern = buf.get_u16_le();
5171        __struct.tslc = buf.get_u16_le();
5172        let tmp = buf.get_u16_le();
5173        __struct.flags = AisFlags::from_bits(tmp & AisFlags::all().bits()).ok_or(
5174            ::mavlink_core::error::ParserError::InvalidFlag {
5175                flag_type: "AisFlags",
5176                value: tmp as u32,
5177            },
5178        )?;
5179        __struct.turn_rate = buf.get_i8();
5180        let tmp = buf.get_u8();
5181        __struct.navigational_status =
5182            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5183                enum_type: "AisNavStatus",
5184                value: tmp as u32,
5185            })?;
5186        let tmp = buf.get_u8();
5187        __struct.mavtype =
5188            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5189                enum_type: "AisType",
5190                value: tmp as u32,
5191            })?;
5192        __struct.dimension_port = buf.get_u8();
5193        __struct.dimension_starboard = buf.get_u8();
5194        for v in &mut __struct.callsign {
5195            let val = buf.get_u8();
5196            *v = val;
5197        }
5198        for v in &mut __struct.name {
5199            let val = buf.get_u8();
5200            *v = val;
5201        }
5202        Ok(__struct)
5203    }
5204    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5205        let mut __tmp = BytesMut::new(bytes);
5206        #[allow(clippy::absurd_extreme_comparisons)]
5207        #[allow(unused_comparisons)]
5208        if __tmp.remaining() < Self::ENCODED_LEN {
5209            panic!(
5210                "buffer is too small (need {} bytes, but got {})",
5211                Self::ENCODED_LEN,
5212                __tmp.remaining(),
5213            )
5214        }
5215        __tmp.put_u32_le(self.MMSI);
5216        __tmp.put_i32_le(self.lat);
5217        __tmp.put_i32_le(self.lon);
5218        __tmp.put_u16_le(self.COG);
5219        __tmp.put_u16_le(self.heading);
5220        __tmp.put_u16_le(self.velocity);
5221        __tmp.put_u16_le(self.dimension_bow);
5222        __tmp.put_u16_le(self.dimension_stern);
5223        __tmp.put_u16_le(self.tslc);
5224        __tmp.put_u16_le(self.flags.bits());
5225        __tmp.put_i8(self.turn_rate);
5226        __tmp.put_u8(self.navigational_status as u8);
5227        __tmp.put_u8(self.mavtype as u8);
5228        __tmp.put_u8(self.dimension_port);
5229        __tmp.put_u8(self.dimension_starboard);
5230        for val in &self.callsign {
5231            __tmp.put_u8(*val);
5232        }
5233        for val in &self.name {
5234            __tmp.put_u8(*val);
5235        }
5236        if matches!(version, MavlinkVersion::V2) {
5237            let len = __tmp.len();
5238            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5239        } else {
5240            __tmp.len()
5241        }
5242    }
5243}
5244#[doc = "The current system altitude."]
5245#[doc = ""]
5246#[doc = "ID: 141"]
5247#[derive(Debug, Clone, PartialEq)]
5248#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5249#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5250#[cfg_attr(feature = "ts", derive(TS))]
5251#[cfg_attr(feature = "ts", ts(export))]
5252pub struct ALTITUDE_DATA {
5253    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
5254    pub time_usec: u64,
5255    #[doc = "This altitude measure is initialized on system boot and monotonic (it is never reset, but represents the local altitude change). The only guarantee on this field is that it will never be reset and is consistent within a flight. The recommended value for this field is the uncorrected barometric altitude at boot time. This altitude will also drift and vary between flights."]
5256    pub altitude_monotonic: f32,
5257    #[doc = "This altitude measure is strictly above mean sea level and might be non-monotonic (it might reset on events like GPS lock or when a new QNH value is set). It should be the altitude to which global altitude waypoints are compared to. Note that it is *not* the GPS altitude, however, most GPS modules already output MSL by default and not the WGS84 altitude."]
5258    pub altitude_amsl: f32,
5259    #[doc = "This is the local altitude in the local coordinate frame. It is not the altitude above home, but in reference to the coordinate origin (0, 0, 0). It is up-positive."]
5260    pub altitude_local: f32,
5261    #[doc = "This is the altitude above the home position. It resets on each change of the current home position."]
5262    pub altitude_relative: f32,
5263    #[doc = "This is the altitude above terrain. It might be fed by a terrain database or an altimeter. Values smaller than -1000 should be interpreted as unknown."]
5264    pub altitude_terrain: f32,
5265    #[doc = "This is not the altitude, but the clear space below the system according to the fused clearance estimate. It generally should max out at the maximum range of e.g. the laser altimeter. It is generally a moving target. A negative value indicates no measurement available."]
5266    pub bottom_clearance: f32,
5267}
5268impl ALTITUDE_DATA {
5269    pub const ENCODED_LEN: usize = 32usize;
5270    pub const DEFAULT: Self = Self {
5271        time_usec: 0_u64,
5272        altitude_monotonic: 0.0_f32,
5273        altitude_amsl: 0.0_f32,
5274        altitude_local: 0.0_f32,
5275        altitude_relative: 0.0_f32,
5276        altitude_terrain: 0.0_f32,
5277        bottom_clearance: 0.0_f32,
5278    };
5279    #[cfg(feature = "arbitrary")]
5280    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5281        use arbitrary::{Arbitrary, Unstructured};
5282        let mut buf = [0u8; 1024];
5283        rng.fill_bytes(&mut buf);
5284        let mut unstructured = Unstructured::new(&buf);
5285        Self::arbitrary(&mut unstructured).unwrap_or_default()
5286    }
5287}
5288impl Default for ALTITUDE_DATA {
5289    fn default() -> Self {
5290        Self::DEFAULT.clone()
5291    }
5292}
5293impl MessageData for ALTITUDE_DATA {
5294    type Message = MavMessage;
5295    const ID: u32 = 141u32;
5296    const NAME: &'static str = "ALTITUDE";
5297    const EXTRA_CRC: u8 = 47u8;
5298    const ENCODED_LEN: usize = 32usize;
5299    fn deser(
5300        _version: MavlinkVersion,
5301        __input: &[u8],
5302    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5303        let avail_len = __input.len();
5304        let mut payload_buf = [0; Self::ENCODED_LEN];
5305        let mut buf = if avail_len < Self::ENCODED_LEN {
5306            payload_buf[0..avail_len].copy_from_slice(__input);
5307            Bytes::new(&payload_buf)
5308        } else {
5309            Bytes::new(__input)
5310        };
5311        let mut __struct = Self::default();
5312        __struct.time_usec = buf.get_u64_le();
5313        __struct.altitude_monotonic = buf.get_f32_le();
5314        __struct.altitude_amsl = buf.get_f32_le();
5315        __struct.altitude_local = buf.get_f32_le();
5316        __struct.altitude_relative = buf.get_f32_le();
5317        __struct.altitude_terrain = buf.get_f32_le();
5318        __struct.bottom_clearance = buf.get_f32_le();
5319        Ok(__struct)
5320    }
5321    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5322        let mut __tmp = BytesMut::new(bytes);
5323        #[allow(clippy::absurd_extreme_comparisons)]
5324        #[allow(unused_comparisons)]
5325        if __tmp.remaining() < Self::ENCODED_LEN {
5326            panic!(
5327                "buffer is too small (need {} bytes, but got {})",
5328                Self::ENCODED_LEN,
5329                __tmp.remaining(),
5330            )
5331        }
5332        __tmp.put_u64_le(self.time_usec);
5333        __tmp.put_f32_le(self.altitude_monotonic);
5334        __tmp.put_f32_le(self.altitude_amsl);
5335        __tmp.put_f32_le(self.altitude_local);
5336        __tmp.put_f32_le(self.altitude_relative);
5337        __tmp.put_f32_le(self.altitude_terrain);
5338        __tmp.put_f32_le(self.bottom_clearance);
5339        if matches!(version, MavlinkVersion::V2) {
5340            let len = __tmp.len();
5341            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5342        } else {
5343            __tmp.len()
5344        }
5345    }
5346}
5347#[doc = "ASL-fixed-wing controller data."]
5348#[doc = ""]
5349#[doc = "ID: 8004"]
5350#[derive(Debug, Clone, PartialEq)]
5351#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5352#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5353#[cfg_attr(feature = "ts", derive(TS))]
5354#[cfg_attr(feature = "ts", ts(export))]
5355pub struct ASLCTRL_DATA_DATA {
5356    #[doc = "Timestamp"]
5357    pub timestamp: u64,
5358    #[doc = "See sourcecode for a description of these values..."]
5359    pub h: f32,
5360    pub hRef: f32,
5361    pub hRef_t: f32,
5362    #[doc = "Pitch angle"]
5363    pub PitchAngle: f32,
5364    #[doc = "Pitch angle reference"]
5365    pub PitchAngleRef: f32,
5366    pub q: f32,
5367    pub qRef: f32,
5368    pub uElev: f32,
5369    pub uThrot: f32,
5370    pub uThrot2: f32,
5371    pub nZ: f32,
5372    #[doc = "Airspeed reference"]
5373    pub AirspeedRef: f32,
5374    #[doc = "Yaw angle"]
5375    pub YawAngle: f32,
5376    #[doc = "Yaw angle reference"]
5377    pub YawAngleRef: f32,
5378    #[doc = "Roll angle"]
5379    pub RollAngle: f32,
5380    #[doc = "Roll angle reference"]
5381    pub RollAngleRef: f32,
5382    pub p: f32,
5383    pub pRef: f32,
5384    pub r: f32,
5385    pub rRef: f32,
5386    pub uAil: f32,
5387    pub uRud: f32,
5388    #[doc = "ASLCTRL control-mode (manual, stabilized, auto, etc...)"]
5389    pub aslctrl_mode: u8,
5390    pub SpoilersEngaged: u8,
5391}
5392impl ASLCTRL_DATA_DATA {
5393    pub const ENCODED_LEN: usize = 98usize;
5394    pub const DEFAULT: Self = Self {
5395        timestamp: 0_u64,
5396        h: 0.0_f32,
5397        hRef: 0.0_f32,
5398        hRef_t: 0.0_f32,
5399        PitchAngle: 0.0_f32,
5400        PitchAngleRef: 0.0_f32,
5401        q: 0.0_f32,
5402        qRef: 0.0_f32,
5403        uElev: 0.0_f32,
5404        uThrot: 0.0_f32,
5405        uThrot2: 0.0_f32,
5406        nZ: 0.0_f32,
5407        AirspeedRef: 0.0_f32,
5408        YawAngle: 0.0_f32,
5409        YawAngleRef: 0.0_f32,
5410        RollAngle: 0.0_f32,
5411        RollAngleRef: 0.0_f32,
5412        p: 0.0_f32,
5413        pRef: 0.0_f32,
5414        r: 0.0_f32,
5415        rRef: 0.0_f32,
5416        uAil: 0.0_f32,
5417        uRud: 0.0_f32,
5418        aslctrl_mode: 0_u8,
5419        SpoilersEngaged: 0_u8,
5420    };
5421    #[cfg(feature = "arbitrary")]
5422    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5423        use arbitrary::{Arbitrary, Unstructured};
5424        let mut buf = [0u8; 1024];
5425        rng.fill_bytes(&mut buf);
5426        let mut unstructured = Unstructured::new(&buf);
5427        Self::arbitrary(&mut unstructured).unwrap_or_default()
5428    }
5429}
5430impl Default for ASLCTRL_DATA_DATA {
5431    fn default() -> Self {
5432        Self::DEFAULT.clone()
5433    }
5434}
5435impl MessageData for ASLCTRL_DATA_DATA {
5436    type Message = MavMessage;
5437    const ID: u32 = 8004u32;
5438    const NAME: &'static str = "ASLCTRL_DATA";
5439    const EXTRA_CRC: u8 = 172u8;
5440    const ENCODED_LEN: usize = 98usize;
5441    fn deser(
5442        _version: MavlinkVersion,
5443        __input: &[u8],
5444    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5445        let avail_len = __input.len();
5446        let mut payload_buf = [0; Self::ENCODED_LEN];
5447        let mut buf = if avail_len < Self::ENCODED_LEN {
5448            payload_buf[0..avail_len].copy_from_slice(__input);
5449            Bytes::new(&payload_buf)
5450        } else {
5451            Bytes::new(__input)
5452        };
5453        let mut __struct = Self::default();
5454        __struct.timestamp = buf.get_u64_le();
5455        __struct.h = buf.get_f32_le();
5456        __struct.hRef = buf.get_f32_le();
5457        __struct.hRef_t = buf.get_f32_le();
5458        __struct.PitchAngle = buf.get_f32_le();
5459        __struct.PitchAngleRef = buf.get_f32_le();
5460        __struct.q = buf.get_f32_le();
5461        __struct.qRef = buf.get_f32_le();
5462        __struct.uElev = buf.get_f32_le();
5463        __struct.uThrot = buf.get_f32_le();
5464        __struct.uThrot2 = buf.get_f32_le();
5465        __struct.nZ = buf.get_f32_le();
5466        __struct.AirspeedRef = buf.get_f32_le();
5467        __struct.YawAngle = buf.get_f32_le();
5468        __struct.YawAngleRef = buf.get_f32_le();
5469        __struct.RollAngle = buf.get_f32_le();
5470        __struct.RollAngleRef = buf.get_f32_le();
5471        __struct.p = buf.get_f32_le();
5472        __struct.pRef = buf.get_f32_le();
5473        __struct.r = buf.get_f32_le();
5474        __struct.rRef = buf.get_f32_le();
5475        __struct.uAil = buf.get_f32_le();
5476        __struct.uRud = buf.get_f32_le();
5477        __struct.aslctrl_mode = buf.get_u8();
5478        __struct.SpoilersEngaged = buf.get_u8();
5479        Ok(__struct)
5480    }
5481    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5482        let mut __tmp = BytesMut::new(bytes);
5483        #[allow(clippy::absurd_extreme_comparisons)]
5484        #[allow(unused_comparisons)]
5485        if __tmp.remaining() < Self::ENCODED_LEN {
5486            panic!(
5487                "buffer is too small (need {} bytes, but got {})",
5488                Self::ENCODED_LEN,
5489                __tmp.remaining(),
5490            )
5491        }
5492        __tmp.put_u64_le(self.timestamp);
5493        __tmp.put_f32_le(self.h);
5494        __tmp.put_f32_le(self.hRef);
5495        __tmp.put_f32_le(self.hRef_t);
5496        __tmp.put_f32_le(self.PitchAngle);
5497        __tmp.put_f32_le(self.PitchAngleRef);
5498        __tmp.put_f32_le(self.q);
5499        __tmp.put_f32_le(self.qRef);
5500        __tmp.put_f32_le(self.uElev);
5501        __tmp.put_f32_le(self.uThrot);
5502        __tmp.put_f32_le(self.uThrot2);
5503        __tmp.put_f32_le(self.nZ);
5504        __tmp.put_f32_le(self.AirspeedRef);
5505        __tmp.put_f32_le(self.YawAngle);
5506        __tmp.put_f32_le(self.YawAngleRef);
5507        __tmp.put_f32_le(self.RollAngle);
5508        __tmp.put_f32_le(self.RollAngleRef);
5509        __tmp.put_f32_le(self.p);
5510        __tmp.put_f32_le(self.pRef);
5511        __tmp.put_f32_le(self.r);
5512        __tmp.put_f32_le(self.rRef);
5513        __tmp.put_f32_le(self.uAil);
5514        __tmp.put_f32_le(self.uRud);
5515        __tmp.put_u8(self.aslctrl_mode);
5516        __tmp.put_u8(self.SpoilersEngaged);
5517        if matches!(version, MavlinkVersion::V2) {
5518            let len = __tmp.len();
5519            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5520        } else {
5521            __tmp.len()
5522        }
5523    }
5524}
5525#[doc = "ASL-fixed-wing controller debug data."]
5526#[doc = ""]
5527#[doc = "ID: 8005"]
5528#[derive(Debug, Clone, PartialEq)]
5529#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5530#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5531#[cfg_attr(feature = "ts", derive(TS))]
5532#[cfg_attr(feature = "ts", ts(export))]
5533pub struct ASLCTRL_DEBUG_DATA {
5534    #[doc = "Debug data"]
5535    pub i32_1: u32,
5536    #[doc = "Debug data"]
5537    pub f_1: f32,
5538    #[doc = "Debug data"]
5539    pub f_2: f32,
5540    #[doc = "Debug data"]
5541    pub f_3: f32,
5542    #[doc = "Debug data"]
5543    pub f_4: f32,
5544    #[doc = "Debug data"]
5545    pub f_5: f32,
5546    #[doc = "Debug data"]
5547    pub f_6: f32,
5548    #[doc = "Debug data"]
5549    pub f_7: f32,
5550    #[doc = "Debug data"]
5551    pub f_8: f32,
5552    #[doc = "Debug data"]
5553    pub i8_1: u8,
5554    #[doc = "Debug data"]
5555    pub i8_2: u8,
5556}
5557impl ASLCTRL_DEBUG_DATA {
5558    pub const ENCODED_LEN: usize = 38usize;
5559    pub const DEFAULT: Self = Self {
5560        i32_1: 0_u32,
5561        f_1: 0.0_f32,
5562        f_2: 0.0_f32,
5563        f_3: 0.0_f32,
5564        f_4: 0.0_f32,
5565        f_5: 0.0_f32,
5566        f_6: 0.0_f32,
5567        f_7: 0.0_f32,
5568        f_8: 0.0_f32,
5569        i8_1: 0_u8,
5570        i8_2: 0_u8,
5571    };
5572    #[cfg(feature = "arbitrary")]
5573    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5574        use arbitrary::{Arbitrary, Unstructured};
5575        let mut buf = [0u8; 1024];
5576        rng.fill_bytes(&mut buf);
5577        let mut unstructured = Unstructured::new(&buf);
5578        Self::arbitrary(&mut unstructured).unwrap_or_default()
5579    }
5580}
5581impl Default for ASLCTRL_DEBUG_DATA {
5582    fn default() -> Self {
5583        Self::DEFAULT.clone()
5584    }
5585}
5586impl MessageData for ASLCTRL_DEBUG_DATA {
5587    type Message = MavMessage;
5588    const ID: u32 = 8005u32;
5589    const NAME: &'static str = "ASLCTRL_DEBUG";
5590    const EXTRA_CRC: u8 = 251u8;
5591    const ENCODED_LEN: usize = 38usize;
5592    fn deser(
5593        _version: MavlinkVersion,
5594        __input: &[u8],
5595    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5596        let avail_len = __input.len();
5597        let mut payload_buf = [0; Self::ENCODED_LEN];
5598        let mut buf = if avail_len < Self::ENCODED_LEN {
5599            payload_buf[0..avail_len].copy_from_slice(__input);
5600            Bytes::new(&payload_buf)
5601        } else {
5602            Bytes::new(__input)
5603        };
5604        let mut __struct = Self::default();
5605        __struct.i32_1 = buf.get_u32_le();
5606        __struct.f_1 = buf.get_f32_le();
5607        __struct.f_2 = buf.get_f32_le();
5608        __struct.f_3 = buf.get_f32_le();
5609        __struct.f_4 = buf.get_f32_le();
5610        __struct.f_5 = buf.get_f32_le();
5611        __struct.f_6 = buf.get_f32_le();
5612        __struct.f_7 = buf.get_f32_le();
5613        __struct.f_8 = buf.get_f32_le();
5614        __struct.i8_1 = buf.get_u8();
5615        __struct.i8_2 = buf.get_u8();
5616        Ok(__struct)
5617    }
5618    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5619        let mut __tmp = BytesMut::new(bytes);
5620        #[allow(clippy::absurd_extreme_comparisons)]
5621        #[allow(unused_comparisons)]
5622        if __tmp.remaining() < Self::ENCODED_LEN {
5623            panic!(
5624                "buffer is too small (need {} bytes, but got {})",
5625                Self::ENCODED_LEN,
5626                __tmp.remaining(),
5627            )
5628        }
5629        __tmp.put_u32_le(self.i32_1);
5630        __tmp.put_f32_le(self.f_1);
5631        __tmp.put_f32_le(self.f_2);
5632        __tmp.put_f32_le(self.f_3);
5633        __tmp.put_f32_le(self.f_4);
5634        __tmp.put_f32_le(self.f_5);
5635        __tmp.put_f32_le(self.f_6);
5636        __tmp.put_f32_le(self.f_7);
5637        __tmp.put_f32_le(self.f_8);
5638        __tmp.put_u8(self.i8_1);
5639        __tmp.put_u8(self.i8_2);
5640        if matches!(version, MavlinkVersion::V2) {
5641            let len = __tmp.len();
5642            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5643        } else {
5644            __tmp.len()
5645        }
5646    }
5647}
5648#[doc = "Extended state information for ASLUAVs."]
5649#[doc = ""]
5650#[doc = "ID: 8006"]
5651#[derive(Debug, Clone, PartialEq)]
5652#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5653#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5654#[cfg_attr(feature = "ts", derive(TS))]
5655#[cfg_attr(feature = "ts", ts(export))]
5656pub struct ASLUAV_STATUS_DATA {
5657    #[doc = "Motor RPM"]
5658    pub Motor_rpm: f32,
5659    #[doc = "Status of the position-indicator LEDs"]
5660    pub LED_status: u8,
5661    #[doc = "Status of the IRIDIUM satellite communication system"]
5662    pub SATCOM_status: u8,
5663    #[doc = "Status vector for up to 8 servos"]
5664    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5665    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5666    pub Servo_status: [u8; 8],
5667}
5668impl ASLUAV_STATUS_DATA {
5669    pub const ENCODED_LEN: usize = 14usize;
5670    pub const DEFAULT: Self = Self {
5671        Motor_rpm: 0.0_f32,
5672        LED_status: 0_u8,
5673        SATCOM_status: 0_u8,
5674        Servo_status: [0_u8; 8usize],
5675    };
5676    #[cfg(feature = "arbitrary")]
5677    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5678        use arbitrary::{Arbitrary, Unstructured};
5679        let mut buf = [0u8; 1024];
5680        rng.fill_bytes(&mut buf);
5681        let mut unstructured = Unstructured::new(&buf);
5682        Self::arbitrary(&mut unstructured).unwrap_or_default()
5683    }
5684}
5685impl Default for ASLUAV_STATUS_DATA {
5686    fn default() -> Self {
5687        Self::DEFAULT.clone()
5688    }
5689}
5690impl MessageData for ASLUAV_STATUS_DATA {
5691    type Message = MavMessage;
5692    const ID: u32 = 8006u32;
5693    const NAME: &'static str = "ASLUAV_STATUS";
5694    const EXTRA_CRC: u8 = 97u8;
5695    const ENCODED_LEN: usize = 14usize;
5696    fn deser(
5697        _version: MavlinkVersion,
5698        __input: &[u8],
5699    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5700        let avail_len = __input.len();
5701        let mut payload_buf = [0; Self::ENCODED_LEN];
5702        let mut buf = if avail_len < Self::ENCODED_LEN {
5703            payload_buf[0..avail_len].copy_from_slice(__input);
5704            Bytes::new(&payload_buf)
5705        } else {
5706            Bytes::new(__input)
5707        };
5708        let mut __struct = Self::default();
5709        __struct.Motor_rpm = buf.get_f32_le();
5710        __struct.LED_status = buf.get_u8();
5711        __struct.SATCOM_status = buf.get_u8();
5712        for v in &mut __struct.Servo_status {
5713            let val = buf.get_u8();
5714            *v = val;
5715        }
5716        Ok(__struct)
5717    }
5718    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5719        let mut __tmp = BytesMut::new(bytes);
5720        #[allow(clippy::absurd_extreme_comparisons)]
5721        #[allow(unused_comparisons)]
5722        if __tmp.remaining() < Self::ENCODED_LEN {
5723            panic!(
5724                "buffer is too small (need {} bytes, but got {})",
5725                Self::ENCODED_LEN,
5726                __tmp.remaining(),
5727            )
5728        }
5729        __tmp.put_f32_le(self.Motor_rpm);
5730        __tmp.put_u8(self.LED_status);
5731        __tmp.put_u8(self.SATCOM_status);
5732        for val in &self.Servo_status {
5733            __tmp.put_u8(*val);
5734        }
5735        if matches!(version, MavlinkVersion::V2) {
5736            let len = __tmp.len();
5737            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5738        } else {
5739            __tmp.len()
5740        }
5741    }
5742}
5743#[doc = "Off-board controls/commands for ASLUAVs."]
5744#[doc = ""]
5745#[doc = "ID: 8008"]
5746#[derive(Debug, Clone, PartialEq)]
5747#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5748#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5749#[cfg_attr(feature = "ts", derive(TS))]
5750#[cfg_attr(feature = "ts", ts(export))]
5751pub struct ASL_OBCTRL_DATA {
5752    #[doc = "Time since system start"]
5753    pub timestamp: u64,
5754    #[doc = "Elevator command [~]"]
5755    pub uElev: f32,
5756    #[doc = "Throttle command [~]"]
5757    pub uThrot: f32,
5758    #[doc = "Throttle 2 command [~]"]
5759    pub uThrot2: f32,
5760    #[doc = "Left aileron command [~]"]
5761    pub uAilL: f32,
5762    #[doc = "Right aileron command [~]"]
5763    pub uAilR: f32,
5764    #[doc = "Rudder command [~]"]
5765    pub uRud: f32,
5766    #[doc = "Off-board computer status"]
5767    pub obctrl_status: u8,
5768}
5769impl ASL_OBCTRL_DATA {
5770    pub const ENCODED_LEN: usize = 33usize;
5771    pub const DEFAULT: Self = Self {
5772        timestamp: 0_u64,
5773        uElev: 0.0_f32,
5774        uThrot: 0.0_f32,
5775        uThrot2: 0.0_f32,
5776        uAilL: 0.0_f32,
5777        uAilR: 0.0_f32,
5778        uRud: 0.0_f32,
5779        obctrl_status: 0_u8,
5780    };
5781    #[cfg(feature = "arbitrary")]
5782    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5783        use arbitrary::{Arbitrary, Unstructured};
5784        let mut buf = [0u8; 1024];
5785        rng.fill_bytes(&mut buf);
5786        let mut unstructured = Unstructured::new(&buf);
5787        Self::arbitrary(&mut unstructured).unwrap_or_default()
5788    }
5789}
5790impl Default for ASL_OBCTRL_DATA {
5791    fn default() -> Self {
5792        Self::DEFAULT.clone()
5793    }
5794}
5795impl MessageData for ASL_OBCTRL_DATA {
5796    type Message = MavMessage;
5797    const ID: u32 = 8008u32;
5798    const NAME: &'static str = "ASL_OBCTRL";
5799    const EXTRA_CRC: u8 = 234u8;
5800    const ENCODED_LEN: usize = 33usize;
5801    fn deser(
5802        _version: MavlinkVersion,
5803        __input: &[u8],
5804    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5805        let avail_len = __input.len();
5806        let mut payload_buf = [0; Self::ENCODED_LEN];
5807        let mut buf = if avail_len < Self::ENCODED_LEN {
5808            payload_buf[0..avail_len].copy_from_slice(__input);
5809            Bytes::new(&payload_buf)
5810        } else {
5811            Bytes::new(__input)
5812        };
5813        let mut __struct = Self::default();
5814        __struct.timestamp = buf.get_u64_le();
5815        __struct.uElev = buf.get_f32_le();
5816        __struct.uThrot = buf.get_f32_le();
5817        __struct.uThrot2 = buf.get_f32_le();
5818        __struct.uAilL = buf.get_f32_le();
5819        __struct.uAilR = buf.get_f32_le();
5820        __struct.uRud = buf.get_f32_le();
5821        __struct.obctrl_status = buf.get_u8();
5822        Ok(__struct)
5823    }
5824    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5825        let mut __tmp = BytesMut::new(bytes);
5826        #[allow(clippy::absurd_extreme_comparisons)]
5827        #[allow(unused_comparisons)]
5828        if __tmp.remaining() < Self::ENCODED_LEN {
5829            panic!(
5830                "buffer is too small (need {} bytes, but got {})",
5831                Self::ENCODED_LEN,
5832                __tmp.remaining(),
5833            )
5834        }
5835        __tmp.put_u64_le(self.timestamp);
5836        __tmp.put_f32_le(self.uElev);
5837        __tmp.put_f32_le(self.uThrot);
5838        __tmp.put_f32_le(self.uThrot2);
5839        __tmp.put_f32_le(self.uAilL);
5840        __tmp.put_f32_le(self.uAilR);
5841        __tmp.put_f32_le(self.uRud);
5842        __tmp.put_u8(self.obctrl_status);
5843        if matches!(version, MavlinkVersion::V2) {
5844            let len = __tmp.len();
5845            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5846        } else {
5847            __tmp.len()
5848        }
5849    }
5850}
5851#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, Y-right, X-front, ZYX, intrinsic)."]
5852#[doc = ""]
5853#[doc = "ID: 30"]
5854#[derive(Debug, Clone, PartialEq)]
5855#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5856#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5857#[cfg_attr(feature = "ts", derive(TS))]
5858#[cfg_attr(feature = "ts", ts(export))]
5859pub struct ATTITUDE_DATA {
5860    #[doc = "Timestamp (time since system boot)."]
5861    pub time_boot_ms: u32,
5862    #[doc = "Roll angle (-pi..+pi)"]
5863    pub roll: f32,
5864    #[doc = "Pitch angle (-pi..+pi)"]
5865    pub pitch: f32,
5866    #[doc = "Yaw angle (-pi..+pi)"]
5867    pub yaw: f32,
5868    #[doc = "Roll angular speed"]
5869    pub rollspeed: f32,
5870    #[doc = "Pitch angular speed"]
5871    pub pitchspeed: f32,
5872    #[doc = "Yaw angular speed"]
5873    pub yawspeed: f32,
5874}
5875impl ATTITUDE_DATA {
5876    pub const ENCODED_LEN: usize = 28usize;
5877    pub const DEFAULT: Self = Self {
5878        time_boot_ms: 0_u32,
5879        roll: 0.0_f32,
5880        pitch: 0.0_f32,
5881        yaw: 0.0_f32,
5882        rollspeed: 0.0_f32,
5883        pitchspeed: 0.0_f32,
5884        yawspeed: 0.0_f32,
5885    };
5886    #[cfg(feature = "arbitrary")]
5887    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5888        use arbitrary::{Arbitrary, Unstructured};
5889        let mut buf = [0u8; 1024];
5890        rng.fill_bytes(&mut buf);
5891        let mut unstructured = Unstructured::new(&buf);
5892        Self::arbitrary(&mut unstructured).unwrap_or_default()
5893    }
5894}
5895impl Default for ATTITUDE_DATA {
5896    fn default() -> Self {
5897        Self::DEFAULT.clone()
5898    }
5899}
5900impl MessageData for ATTITUDE_DATA {
5901    type Message = MavMessage;
5902    const ID: u32 = 30u32;
5903    const NAME: &'static str = "ATTITUDE";
5904    const EXTRA_CRC: u8 = 39u8;
5905    const ENCODED_LEN: usize = 28usize;
5906    fn deser(
5907        _version: MavlinkVersion,
5908        __input: &[u8],
5909    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5910        let avail_len = __input.len();
5911        let mut payload_buf = [0; Self::ENCODED_LEN];
5912        let mut buf = if avail_len < Self::ENCODED_LEN {
5913            payload_buf[0..avail_len].copy_from_slice(__input);
5914            Bytes::new(&payload_buf)
5915        } else {
5916            Bytes::new(__input)
5917        };
5918        let mut __struct = Self::default();
5919        __struct.time_boot_ms = buf.get_u32_le();
5920        __struct.roll = buf.get_f32_le();
5921        __struct.pitch = buf.get_f32_le();
5922        __struct.yaw = buf.get_f32_le();
5923        __struct.rollspeed = buf.get_f32_le();
5924        __struct.pitchspeed = buf.get_f32_le();
5925        __struct.yawspeed = buf.get_f32_le();
5926        Ok(__struct)
5927    }
5928    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5929        let mut __tmp = BytesMut::new(bytes);
5930        #[allow(clippy::absurd_extreme_comparisons)]
5931        #[allow(unused_comparisons)]
5932        if __tmp.remaining() < Self::ENCODED_LEN {
5933            panic!(
5934                "buffer is too small (need {} bytes, but got {})",
5935                Self::ENCODED_LEN,
5936                __tmp.remaining(),
5937            )
5938        }
5939        __tmp.put_u32_le(self.time_boot_ms);
5940        __tmp.put_f32_le(self.roll);
5941        __tmp.put_f32_le(self.pitch);
5942        __tmp.put_f32_le(self.yaw);
5943        __tmp.put_f32_le(self.rollspeed);
5944        __tmp.put_f32_le(self.pitchspeed);
5945        __tmp.put_f32_le(self.yawspeed);
5946        if matches!(version, MavlinkVersion::V2) {
5947            let len = __tmp.len();
5948            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5949        } else {
5950            __tmp.len()
5951        }
5952    }
5953}
5954#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
5955#[doc = ""]
5956#[doc = "ID: 31"]
5957#[derive(Debug, Clone, PartialEq)]
5958#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5959#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5960#[cfg_attr(feature = "ts", derive(TS))]
5961#[cfg_attr(feature = "ts", ts(export))]
5962pub struct ATTITUDE_QUATERNION_DATA {
5963    #[doc = "Timestamp (time since system boot)."]
5964    pub time_boot_ms: u32,
5965    #[doc = "Quaternion component 1, w (1 in null-rotation)"]
5966    pub q1: f32,
5967    #[doc = "Quaternion component 2, x (0 in null-rotation)"]
5968    pub q2: f32,
5969    #[doc = "Quaternion component 3, y (0 in null-rotation)"]
5970    pub q3: f32,
5971    #[doc = "Quaternion component 4, z (0 in null-rotation)"]
5972    pub q4: f32,
5973    #[doc = "Roll angular speed"]
5974    pub rollspeed: f32,
5975    #[doc = "Pitch angular speed"]
5976    pub pitchspeed: f32,
5977    #[doc = "Yaw angular speed"]
5978    pub yawspeed: f32,
5979    #[doc = "Rotation offset by which the attitude quaternion and angular speed vector should be rotated for user display (quaternion with [w, x, y, z] order, zero-rotation is [1, 0, 0, 0], send [0, 0, 0, 0] if field not supported). This field is intended for systems in which the reference attitude may change during flight. For example, tailsitters VTOLs rotate their reference attitude by 90 degrees between hover mode and fixed wing mode, thus repr_offset_q is equal to [1, 0, 0, 0] in hover mode and equal to [0.7071, 0, 0.7071, 0] in fixed wing mode."]
5980    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
5981    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5982    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5983    pub repr_offset_q: [f32; 4],
5984}
5985impl ATTITUDE_QUATERNION_DATA {
5986    pub const ENCODED_LEN: usize = 48usize;
5987    pub const DEFAULT: Self = Self {
5988        time_boot_ms: 0_u32,
5989        q1: 0.0_f32,
5990        q2: 0.0_f32,
5991        q3: 0.0_f32,
5992        q4: 0.0_f32,
5993        rollspeed: 0.0_f32,
5994        pitchspeed: 0.0_f32,
5995        yawspeed: 0.0_f32,
5996        repr_offset_q: [0.0_f32; 4usize],
5997    };
5998    #[cfg(feature = "arbitrary")]
5999    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6000        use arbitrary::{Arbitrary, Unstructured};
6001        let mut buf = [0u8; 1024];
6002        rng.fill_bytes(&mut buf);
6003        let mut unstructured = Unstructured::new(&buf);
6004        Self::arbitrary(&mut unstructured).unwrap_or_default()
6005    }
6006}
6007impl Default for ATTITUDE_QUATERNION_DATA {
6008    fn default() -> Self {
6009        Self::DEFAULT.clone()
6010    }
6011}
6012impl MessageData for ATTITUDE_QUATERNION_DATA {
6013    type Message = MavMessage;
6014    const ID: u32 = 31u32;
6015    const NAME: &'static str = "ATTITUDE_QUATERNION";
6016    const EXTRA_CRC: u8 = 246u8;
6017    const ENCODED_LEN: usize = 48usize;
6018    fn deser(
6019        _version: MavlinkVersion,
6020        __input: &[u8],
6021    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6022        let avail_len = __input.len();
6023        let mut payload_buf = [0; Self::ENCODED_LEN];
6024        let mut buf = if avail_len < Self::ENCODED_LEN {
6025            payload_buf[0..avail_len].copy_from_slice(__input);
6026            Bytes::new(&payload_buf)
6027        } else {
6028            Bytes::new(__input)
6029        };
6030        let mut __struct = Self::default();
6031        __struct.time_boot_ms = buf.get_u32_le();
6032        __struct.q1 = buf.get_f32_le();
6033        __struct.q2 = buf.get_f32_le();
6034        __struct.q3 = buf.get_f32_le();
6035        __struct.q4 = buf.get_f32_le();
6036        __struct.rollspeed = buf.get_f32_le();
6037        __struct.pitchspeed = buf.get_f32_le();
6038        __struct.yawspeed = buf.get_f32_le();
6039        for v in &mut __struct.repr_offset_q {
6040            let val = buf.get_f32_le();
6041            *v = val;
6042        }
6043        Ok(__struct)
6044    }
6045    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6046        let mut __tmp = BytesMut::new(bytes);
6047        #[allow(clippy::absurd_extreme_comparisons)]
6048        #[allow(unused_comparisons)]
6049        if __tmp.remaining() < Self::ENCODED_LEN {
6050            panic!(
6051                "buffer is too small (need {} bytes, but got {})",
6052                Self::ENCODED_LEN,
6053                __tmp.remaining(),
6054            )
6055        }
6056        __tmp.put_u32_le(self.time_boot_ms);
6057        __tmp.put_f32_le(self.q1);
6058        __tmp.put_f32_le(self.q2);
6059        __tmp.put_f32_le(self.q3);
6060        __tmp.put_f32_le(self.q4);
6061        __tmp.put_f32_le(self.rollspeed);
6062        __tmp.put_f32_le(self.pitchspeed);
6063        __tmp.put_f32_le(self.yawspeed);
6064        if matches!(version, MavlinkVersion::V2) {
6065            for val in &self.repr_offset_q {
6066                __tmp.put_f32_le(*val);
6067            }
6068            let len = __tmp.len();
6069            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6070        } else {
6071            __tmp.len()
6072        }
6073    }
6074}
6075#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
6076#[doc = ""]
6077#[doc = "ID: 61"]
6078#[derive(Debug, Clone, PartialEq)]
6079#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6080#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6081#[cfg_attr(feature = "ts", derive(TS))]
6082#[cfg_attr(feature = "ts", ts(export))]
6083pub struct ATTITUDE_QUATERNION_COV_DATA {
6084    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
6085    pub time_usec: u64,
6086    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation)"]
6087    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6088    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6089    pub q: [f32; 4],
6090    #[doc = "Roll angular speed"]
6091    pub rollspeed: f32,
6092    #[doc = "Pitch angular speed"]
6093    pub pitchspeed: f32,
6094    #[doc = "Yaw angular speed"]
6095    pub yawspeed: f32,
6096    #[doc = "Row-major representation of a 3x3 attitude covariance matrix (states: roll, pitch, yaw; first three entries are the first ROW, next three entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
6097    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6098    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6099    pub covariance: [f32; 9],
6100}
6101impl ATTITUDE_QUATERNION_COV_DATA {
6102    pub const ENCODED_LEN: usize = 72usize;
6103    pub const DEFAULT: Self = Self {
6104        time_usec: 0_u64,
6105        q: [0.0_f32; 4usize],
6106        rollspeed: 0.0_f32,
6107        pitchspeed: 0.0_f32,
6108        yawspeed: 0.0_f32,
6109        covariance: [0.0_f32; 9usize],
6110    };
6111    #[cfg(feature = "arbitrary")]
6112    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6113        use arbitrary::{Arbitrary, Unstructured};
6114        let mut buf = [0u8; 1024];
6115        rng.fill_bytes(&mut buf);
6116        let mut unstructured = Unstructured::new(&buf);
6117        Self::arbitrary(&mut unstructured).unwrap_or_default()
6118    }
6119}
6120impl Default for ATTITUDE_QUATERNION_COV_DATA {
6121    fn default() -> Self {
6122        Self::DEFAULT.clone()
6123    }
6124}
6125impl MessageData for ATTITUDE_QUATERNION_COV_DATA {
6126    type Message = MavMessage;
6127    const ID: u32 = 61u32;
6128    const NAME: &'static str = "ATTITUDE_QUATERNION_COV";
6129    const EXTRA_CRC: u8 = 167u8;
6130    const ENCODED_LEN: usize = 72usize;
6131    fn deser(
6132        _version: MavlinkVersion,
6133        __input: &[u8],
6134    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6135        let avail_len = __input.len();
6136        let mut payload_buf = [0; Self::ENCODED_LEN];
6137        let mut buf = if avail_len < Self::ENCODED_LEN {
6138            payload_buf[0..avail_len].copy_from_slice(__input);
6139            Bytes::new(&payload_buf)
6140        } else {
6141            Bytes::new(__input)
6142        };
6143        let mut __struct = Self::default();
6144        __struct.time_usec = buf.get_u64_le();
6145        for v in &mut __struct.q {
6146            let val = buf.get_f32_le();
6147            *v = val;
6148        }
6149        __struct.rollspeed = buf.get_f32_le();
6150        __struct.pitchspeed = buf.get_f32_le();
6151        __struct.yawspeed = buf.get_f32_le();
6152        for v in &mut __struct.covariance {
6153            let val = buf.get_f32_le();
6154            *v = val;
6155        }
6156        Ok(__struct)
6157    }
6158    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6159        let mut __tmp = BytesMut::new(bytes);
6160        #[allow(clippy::absurd_extreme_comparisons)]
6161        #[allow(unused_comparisons)]
6162        if __tmp.remaining() < Self::ENCODED_LEN {
6163            panic!(
6164                "buffer is too small (need {} bytes, but got {})",
6165                Self::ENCODED_LEN,
6166                __tmp.remaining(),
6167            )
6168        }
6169        __tmp.put_u64_le(self.time_usec);
6170        for val in &self.q {
6171            __tmp.put_f32_le(*val);
6172        }
6173        __tmp.put_f32_le(self.rollspeed);
6174        __tmp.put_f32_le(self.pitchspeed);
6175        __tmp.put_f32_le(self.yawspeed);
6176        for val in &self.covariance {
6177            __tmp.put_f32_le(*val);
6178        }
6179        if matches!(version, MavlinkVersion::V2) {
6180            let len = __tmp.len();
6181            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6182        } else {
6183            __tmp.len()
6184        }
6185    }
6186}
6187#[doc = "Reports the current commanded attitude of the vehicle as specified by the autopilot. This should match the commands sent in a SET_ATTITUDE_TARGET message if the vehicle is being controlled this way."]
6188#[doc = ""]
6189#[doc = "ID: 83"]
6190#[derive(Debug, Clone, PartialEq)]
6191#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6192#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6193#[cfg_attr(feature = "ts", derive(TS))]
6194#[cfg_attr(feature = "ts", ts(export))]
6195pub struct ATTITUDE_TARGET_DATA {
6196    #[doc = "Timestamp (time since system boot)."]
6197    pub time_boot_ms: u32,
6198    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
6199    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6200    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6201    pub q: [f32; 4],
6202    #[doc = "Body roll rate"]
6203    pub body_roll_rate: f32,
6204    #[doc = "Body pitch rate"]
6205    pub body_pitch_rate: f32,
6206    #[doc = "Body yaw rate"]
6207    pub body_yaw_rate: f32,
6208    #[doc = "Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust)"]
6209    pub thrust: f32,
6210    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
6211    pub type_mask: AttitudeTargetTypemask,
6212}
6213impl ATTITUDE_TARGET_DATA {
6214    pub const ENCODED_LEN: usize = 37usize;
6215    pub const DEFAULT: Self = Self {
6216        time_boot_ms: 0_u32,
6217        q: [0.0_f32; 4usize],
6218        body_roll_rate: 0.0_f32,
6219        body_pitch_rate: 0.0_f32,
6220        body_yaw_rate: 0.0_f32,
6221        thrust: 0.0_f32,
6222        type_mask: AttitudeTargetTypemask::DEFAULT,
6223    };
6224    #[cfg(feature = "arbitrary")]
6225    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6226        use arbitrary::{Arbitrary, Unstructured};
6227        let mut buf = [0u8; 1024];
6228        rng.fill_bytes(&mut buf);
6229        let mut unstructured = Unstructured::new(&buf);
6230        Self::arbitrary(&mut unstructured).unwrap_or_default()
6231    }
6232}
6233impl Default for ATTITUDE_TARGET_DATA {
6234    fn default() -> Self {
6235        Self::DEFAULT.clone()
6236    }
6237}
6238impl MessageData for ATTITUDE_TARGET_DATA {
6239    type Message = MavMessage;
6240    const ID: u32 = 83u32;
6241    const NAME: &'static str = "ATTITUDE_TARGET";
6242    const EXTRA_CRC: u8 = 22u8;
6243    const ENCODED_LEN: usize = 37usize;
6244    fn deser(
6245        _version: MavlinkVersion,
6246        __input: &[u8],
6247    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6248        let avail_len = __input.len();
6249        let mut payload_buf = [0; Self::ENCODED_LEN];
6250        let mut buf = if avail_len < Self::ENCODED_LEN {
6251            payload_buf[0..avail_len].copy_from_slice(__input);
6252            Bytes::new(&payload_buf)
6253        } else {
6254            Bytes::new(__input)
6255        };
6256        let mut __struct = Self::default();
6257        __struct.time_boot_ms = buf.get_u32_le();
6258        for v in &mut __struct.q {
6259            let val = buf.get_f32_le();
6260            *v = val;
6261        }
6262        __struct.body_roll_rate = buf.get_f32_le();
6263        __struct.body_pitch_rate = buf.get_f32_le();
6264        __struct.body_yaw_rate = buf.get_f32_le();
6265        __struct.thrust = buf.get_f32_le();
6266        let tmp = buf.get_u8();
6267        __struct.type_mask = AttitudeTargetTypemask::from_bits(
6268            tmp & AttitudeTargetTypemask::all().bits(),
6269        )
6270        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6271            flag_type: "AttitudeTargetTypemask",
6272            value: tmp as u32,
6273        })?;
6274        Ok(__struct)
6275    }
6276    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6277        let mut __tmp = BytesMut::new(bytes);
6278        #[allow(clippy::absurd_extreme_comparisons)]
6279        #[allow(unused_comparisons)]
6280        if __tmp.remaining() < Self::ENCODED_LEN {
6281            panic!(
6282                "buffer is too small (need {} bytes, but got {})",
6283                Self::ENCODED_LEN,
6284                __tmp.remaining(),
6285            )
6286        }
6287        __tmp.put_u32_le(self.time_boot_ms);
6288        for val in &self.q {
6289            __tmp.put_f32_le(*val);
6290        }
6291        __tmp.put_f32_le(self.body_roll_rate);
6292        __tmp.put_f32_le(self.body_pitch_rate);
6293        __tmp.put_f32_le(self.body_yaw_rate);
6294        __tmp.put_f32_le(self.thrust);
6295        __tmp.put_u8(self.type_mask.bits());
6296        if matches!(version, MavlinkVersion::V2) {
6297            let len = __tmp.len();
6298            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6299        } else {
6300            __tmp.len()
6301        }
6302    }
6303}
6304#[doc = "Motion capture attitude and position."]
6305#[doc = ""]
6306#[doc = "ID: 138"]
6307#[derive(Debug, Clone, PartialEq)]
6308#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6309#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6310#[cfg_attr(feature = "ts", derive(TS))]
6311#[cfg_attr(feature = "ts", ts(export))]
6312pub struct ATT_POS_MOCAP_DATA {
6313    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
6314    pub time_usec: u64,
6315    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
6316    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6317    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6318    pub q: [f32; 4],
6319    #[doc = "X position (NED)"]
6320    pub x: f32,
6321    #[doc = "Y position (NED)"]
6322    pub y: f32,
6323    #[doc = "Z position (NED)"]
6324    pub z: f32,
6325    #[doc = "Row-major representation of a pose 6x6 cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
6326    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6327    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6328    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6329    pub covariance: [f32; 21],
6330}
6331impl ATT_POS_MOCAP_DATA {
6332    pub const ENCODED_LEN: usize = 120usize;
6333    pub const DEFAULT: Self = Self {
6334        time_usec: 0_u64,
6335        q: [0.0_f32; 4usize],
6336        x: 0.0_f32,
6337        y: 0.0_f32,
6338        z: 0.0_f32,
6339        covariance: [0.0_f32; 21usize],
6340    };
6341    #[cfg(feature = "arbitrary")]
6342    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6343        use arbitrary::{Arbitrary, Unstructured};
6344        let mut buf = [0u8; 1024];
6345        rng.fill_bytes(&mut buf);
6346        let mut unstructured = Unstructured::new(&buf);
6347        Self::arbitrary(&mut unstructured).unwrap_or_default()
6348    }
6349}
6350impl Default for ATT_POS_MOCAP_DATA {
6351    fn default() -> Self {
6352        Self::DEFAULT.clone()
6353    }
6354}
6355impl MessageData for ATT_POS_MOCAP_DATA {
6356    type Message = MavMessage;
6357    const ID: u32 = 138u32;
6358    const NAME: &'static str = "ATT_POS_MOCAP";
6359    const EXTRA_CRC: u8 = 109u8;
6360    const ENCODED_LEN: usize = 120usize;
6361    fn deser(
6362        _version: MavlinkVersion,
6363        __input: &[u8],
6364    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6365        let avail_len = __input.len();
6366        let mut payload_buf = [0; Self::ENCODED_LEN];
6367        let mut buf = if avail_len < Self::ENCODED_LEN {
6368            payload_buf[0..avail_len].copy_from_slice(__input);
6369            Bytes::new(&payload_buf)
6370        } else {
6371            Bytes::new(__input)
6372        };
6373        let mut __struct = Self::default();
6374        __struct.time_usec = buf.get_u64_le();
6375        for v in &mut __struct.q {
6376            let val = buf.get_f32_le();
6377            *v = val;
6378        }
6379        __struct.x = buf.get_f32_le();
6380        __struct.y = buf.get_f32_le();
6381        __struct.z = buf.get_f32_le();
6382        for v in &mut __struct.covariance {
6383            let val = buf.get_f32_le();
6384            *v = val;
6385        }
6386        Ok(__struct)
6387    }
6388    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6389        let mut __tmp = BytesMut::new(bytes);
6390        #[allow(clippy::absurd_extreme_comparisons)]
6391        #[allow(unused_comparisons)]
6392        if __tmp.remaining() < Self::ENCODED_LEN {
6393            panic!(
6394                "buffer is too small (need {} bytes, but got {})",
6395                Self::ENCODED_LEN,
6396                __tmp.remaining(),
6397            )
6398        }
6399        __tmp.put_u64_le(self.time_usec);
6400        for val in &self.q {
6401            __tmp.put_f32_le(*val);
6402        }
6403        __tmp.put_f32_le(self.x);
6404        __tmp.put_f32_le(self.y);
6405        __tmp.put_f32_le(self.z);
6406        if matches!(version, MavlinkVersion::V2) {
6407            for val in &self.covariance {
6408                __tmp.put_f32_le(*val);
6409            }
6410            let len = __tmp.len();
6411            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6412        } else {
6413            __tmp.len()
6414        }
6415    }
6416}
6417#[doc = "Emit an encrypted signature / key identifying this system. PLEASE NOTE: This protocol has been kept simple, so transmitting the key requires an encrypted channel for true safety."]
6418#[doc = ""]
6419#[doc = "ID: 7"]
6420#[derive(Debug, Clone, PartialEq)]
6421#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6422#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6423#[cfg_attr(feature = "ts", derive(TS))]
6424#[cfg_attr(feature = "ts", ts(export))]
6425pub struct AUTH_KEY_DATA {
6426    #[doc = "key"]
6427    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6428    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6429    pub key: [u8; 32],
6430}
6431impl AUTH_KEY_DATA {
6432    pub const ENCODED_LEN: usize = 32usize;
6433    pub const DEFAULT: Self = Self {
6434        key: [0_u8; 32usize],
6435    };
6436    #[cfg(feature = "arbitrary")]
6437    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6438        use arbitrary::{Arbitrary, Unstructured};
6439        let mut buf = [0u8; 1024];
6440        rng.fill_bytes(&mut buf);
6441        let mut unstructured = Unstructured::new(&buf);
6442        Self::arbitrary(&mut unstructured).unwrap_or_default()
6443    }
6444}
6445impl Default for AUTH_KEY_DATA {
6446    fn default() -> Self {
6447        Self::DEFAULT.clone()
6448    }
6449}
6450impl MessageData for AUTH_KEY_DATA {
6451    type Message = MavMessage;
6452    const ID: u32 = 7u32;
6453    const NAME: &'static str = "AUTH_KEY";
6454    const EXTRA_CRC: u8 = 119u8;
6455    const ENCODED_LEN: usize = 32usize;
6456    fn deser(
6457        _version: MavlinkVersion,
6458        __input: &[u8],
6459    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6460        let avail_len = __input.len();
6461        let mut payload_buf = [0; Self::ENCODED_LEN];
6462        let mut buf = if avail_len < Self::ENCODED_LEN {
6463            payload_buf[0..avail_len].copy_from_slice(__input);
6464            Bytes::new(&payload_buf)
6465        } else {
6466            Bytes::new(__input)
6467        };
6468        let mut __struct = Self::default();
6469        for v in &mut __struct.key {
6470            let val = buf.get_u8();
6471            *v = val;
6472        }
6473        Ok(__struct)
6474    }
6475    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6476        let mut __tmp = BytesMut::new(bytes);
6477        #[allow(clippy::absurd_extreme_comparisons)]
6478        #[allow(unused_comparisons)]
6479        if __tmp.remaining() < Self::ENCODED_LEN {
6480            panic!(
6481                "buffer is too small (need {} bytes, but got {})",
6482                Self::ENCODED_LEN,
6483                __tmp.remaining(),
6484            )
6485        }
6486        for val in &self.key {
6487            __tmp.put_u8(*val);
6488        }
6489        if matches!(version, MavlinkVersion::V2) {
6490            let len = __tmp.len();
6491            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6492        } else {
6493            __tmp.len()
6494        }
6495    }
6496}
6497#[doc = "Low level message containing autopilot state relevant for a gimbal device. This message is to be sent from the autopilot to the gimbal device component. The data of this message are for the gimbal device's estimator corrections, in particular horizon compensation, as well as indicates autopilot control intentions, e.g. feed forward angular control in the z-axis."]
6498#[doc = ""]
6499#[doc = "ID: 286"]
6500#[derive(Debug, Clone, PartialEq)]
6501#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6502#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6503#[cfg_attr(feature = "ts", derive(TS))]
6504#[cfg_attr(feature = "ts", ts(export))]
6505pub struct AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6506    #[doc = "Timestamp (time since system boot)."]
6507    pub time_boot_us: u64,
6508    #[doc = "Quaternion components of autopilot attitude: w, x, y, z (1 0 0 0 is the null-rotation, Hamilton convention)."]
6509    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6510    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6511    pub q: [f32; 4],
6512    #[doc = "Estimated delay of the attitude data. 0 if unknown."]
6513    pub q_estimated_delay_us: u32,
6514    #[doc = "X Speed in NED (North, East, Down). NAN if unknown."]
6515    pub vx: f32,
6516    #[doc = "Y Speed in NED (North, East, Down). NAN if unknown."]
6517    pub vy: f32,
6518    #[doc = "Z Speed in NED (North, East, Down). NAN if unknown."]
6519    pub vz: f32,
6520    #[doc = "Estimated delay of the speed data. 0 if unknown."]
6521    pub v_estimated_delay_us: u32,
6522    #[doc = "Feed forward Z component of angular velocity (positive: yawing to the right). NaN to be ignored. This is to indicate if the autopilot is actively yawing."]
6523    pub feed_forward_angular_velocity_z: f32,
6524    #[doc = "Bitmap indicating which estimator outputs are valid."]
6525    pub estimator_status: EstimatorStatusFlags,
6526    #[doc = "System ID"]
6527    pub target_system: u8,
6528    #[doc = "Component ID"]
6529    pub target_component: u8,
6530    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
6531    pub landed_state: MavLandedState,
6532    #[doc = "Z component of angular velocity in NED (North, East, Down). NaN if unknown."]
6533    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6534    pub angular_velocity_z: f32,
6535}
6536impl AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6537    pub const ENCODED_LEN: usize = 57usize;
6538    pub const DEFAULT: Self = Self {
6539        time_boot_us: 0_u64,
6540        q: [0.0_f32; 4usize],
6541        q_estimated_delay_us: 0_u32,
6542        vx: 0.0_f32,
6543        vy: 0.0_f32,
6544        vz: 0.0_f32,
6545        v_estimated_delay_us: 0_u32,
6546        feed_forward_angular_velocity_z: 0.0_f32,
6547        estimator_status: EstimatorStatusFlags::DEFAULT,
6548        target_system: 0_u8,
6549        target_component: 0_u8,
6550        landed_state: MavLandedState::DEFAULT,
6551        angular_velocity_z: 0.0_f32,
6552    };
6553    #[cfg(feature = "arbitrary")]
6554    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6555        use arbitrary::{Arbitrary, Unstructured};
6556        let mut buf = [0u8; 1024];
6557        rng.fill_bytes(&mut buf);
6558        let mut unstructured = Unstructured::new(&buf);
6559        Self::arbitrary(&mut unstructured).unwrap_or_default()
6560    }
6561}
6562impl Default for AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6563    fn default() -> Self {
6564        Self::DEFAULT.clone()
6565    }
6566}
6567impl MessageData for AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6568    type Message = MavMessage;
6569    const ID: u32 = 286u32;
6570    const NAME: &'static str = "AUTOPILOT_STATE_FOR_GIMBAL_DEVICE";
6571    const EXTRA_CRC: u8 = 210u8;
6572    const ENCODED_LEN: usize = 57usize;
6573    fn deser(
6574        _version: MavlinkVersion,
6575        __input: &[u8],
6576    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6577        let avail_len = __input.len();
6578        let mut payload_buf = [0; Self::ENCODED_LEN];
6579        let mut buf = if avail_len < Self::ENCODED_LEN {
6580            payload_buf[0..avail_len].copy_from_slice(__input);
6581            Bytes::new(&payload_buf)
6582        } else {
6583            Bytes::new(__input)
6584        };
6585        let mut __struct = Self::default();
6586        __struct.time_boot_us = buf.get_u64_le();
6587        for v in &mut __struct.q {
6588            let val = buf.get_f32_le();
6589            *v = val;
6590        }
6591        __struct.q_estimated_delay_us = buf.get_u32_le();
6592        __struct.vx = buf.get_f32_le();
6593        __struct.vy = buf.get_f32_le();
6594        __struct.vz = buf.get_f32_le();
6595        __struct.v_estimated_delay_us = buf.get_u32_le();
6596        __struct.feed_forward_angular_velocity_z = buf.get_f32_le();
6597        let tmp = buf.get_u16_le();
6598        __struct.estimator_status = EstimatorStatusFlags::from_bits(
6599            tmp & EstimatorStatusFlags::all().bits(),
6600        )
6601        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6602            flag_type: "EstimatorStatusFlags",
6603            value: tmp as u32,
6604        })?;
6605        __struct.target_system = buf.get_u8();
6606        __struct.target_component = buf.get_u8();
6607        let tmp = buf.get_u8();
6608        __struct.landed_state =
6609            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6610                enum_type: "MavLandedState",
6611                value: tmp as u32,
6612            })?;
6613        __struct.angular_velocity_z = buf.get_f32_le();
6614        Ok(__struct)
6615    }
6616    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6617        let mut __tmp = BytesMut::new(bytes);
6618        #[allow(clippy::absurd_extreme_comparisons)]
6619        #[allow(unused_comparisons)]
6620        if __tmp.remaining() < Self::ENCODED_LEN {
6621            panic!(
6622                "buffer is too small (need {} bytes, but got {})",
6623                Self::ENCODED_LEN,
6624                __tmp.remaining(),
6625            )
6626        }
6627        __tmp.put_u64_le(self.time_boot_us);
6628        for val in &self.q {
6629            __tmp.put_f32_le(*val);
6630        }
6631        __tmp.put_u32_le(self.q_estimated_delay_us);
6632        __tmp.put_f32_le(self.vx);
6633        __tmp.put_f32_le(self.vy);
6634        __tmp.put_f32_le(self.vz);
6635        __tmp.put_u32_le(self.v_estimated_delay_us);
6636        __tmp.put_f32_le(self.feed_forward_angular_velocity_z);
6637        __tmp.put_u16_le(self.estimator_status.bits());
6638        __tmp.put_u8(self.target_system);
6639        __tmp.put_u8(self.target_component);
6640        __tmp.put_u8(self.landed_state as u8);
6641        if matches!(version, MavlinkVersion::V2) {
6642            __tmp.put_f32_le(self.angular_velocity_z);
6643            let len = __tmp.len();
6644            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6645        } else {
6646            __tmp.len()
6647        }
6648    }
6649}
6650#[doc = "Version and capability of autopilot software. This should be emitted in response to a request with MAV_CMD_REQUEST_MESSAGE."]
6651#[doc = ""]
6652#[doc = "ID: 148"]
6653#[derive(Debug, Clone, PartialEq)]
6654#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6655#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6656#[cfg_attr(feature = "ts", derive(TS))]
6657#[cfg_attr(feature = "ts", ts(export))]
6658pub struct AUTOPILOT_VERSION_DATA {
6659    #[doc = "Bitmap of capabilities"]
6660    pub capabilities: MavProtocolCapability,
6661    #[doc = "UID if provided by hardware (see uid2)"]
6662    pub uid: u64,
6663    #[doc = "Firmware version number.         The field must be encoded as 4 bytes, where each byte (shown from MSB to LSB) is part of a semantic version: (major) (minor) (patch) (FIRMWARE_VERSION_TYPE)."]
6664    pub flight_sw_version: u32,
6665    #[doc = "Middleware version number"]
6666    pub middleware_sw_version: u32,
6667    #[doc = "Operating system version number"]
6668    pub os_sw_version: u32,
6669    #[doc = "HW / board version (last 8 bits should be silicon ID, if any). The first 16 bits of this field specify <https://github.com/PX4/PX4-Bootloader/blob/master/board_types.txt>"]
6670    pub board_version: u32,
6671    #[doc = "ID of the board vendor"]
6672    pub vendor_id: u16,
6673    #[doc = "ID of the product"]
6674    pub product_id: u16,
6675    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
6676    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6677    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6678    pub flight_custom_version: [u8; 8],
6679    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
6680    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6681    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6682    pub middleware_custom_version: [u8; 8],
6683    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
6684    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6685    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6686    pub os_custom_version: [u8; 8],
6687    #[doc = "UID if provided by hardware (supersedes the uid field. If this is non-zero, use this field, otherwise use uid)"]
6688    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6689    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6690    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6691    pub uid2: [u8; 18],
6692}
6693impl AUTOPILOT_VERSION_DATA {
6694    pub const ENCODED_LEN: usize = 78usize;
6695    pub const DEFAULT: Self = Self {
6696        capabilities: MavProtocolCapability::DEFAULT,
6697        uid: 0_u64,
6698        flight_sw_version: 0_u32,
6699        middleware_sw_version: 0_u32,
6700        os_sw_version: 0_u32,
6701        board_version: 0_u32,
6702        vendor_id: 0_u16,
6703        product_id: 0_u16,
6704        flight_custom_version: [0_u8; 8usize],
6705        middleware_custom_version: [0_u8; 8usize],
6706        os_custom_version: [0_u8; 8usize],
6707        uid2: [0_u8; 18usize],
6708    };
6709    #[cfg(feature = "arbitrary")]
6710    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6711        use arbitrary::{Arbitrary, Unstructured};
6712        let mut buf = [0u8; 1024];
6713        rng.fill_bytes(&mut buf);
6714        let mut unstructured = Unstructured::new(&buf);
6715        Self::arbitrary(&mut unstructured).unwrap_or_default()
6716    }
6717}
6718impl Default for AUTOPILOT_VERSION_DATA {
6719    fn default() -> Self {
6720        Self::DEFAULT.clone()
6721    }
6722}
6723impl MessageData for AUTOPILOT_VERSION_DATA {
6724    type Message = MavMessage;
6725    const ID: u32 = 148u32;
6726    const NAME: &'static str = "AUTOPILOT_VERSION";
6727    const EXTRA_CRC: u8 = 178u8;
6728    const ENCODED_LEN: usize = 78usize;
6729    fn deser(
6730        _version: MavlinkVersion,
6731        __input: &[u8],
6732    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6733        let avail_len = __input.len();
6734        let mut payload_buf = [0; Self::ENCODED_LEN];
6735        let mut buf = if avail_len < Self::ENCODED_LEN {
6736            payload_buf[0..avail_len].copy_from_slice(__input);
6737            Bytes::new(&payload_buf)
6738        } else {
6739            Bytes::new(__input)
6740        };
6741        let mut __struct = Self::default();
6742        let tmp = buf.get_u64_le();
6743        __struct.capabilities = MavProtocolCapability::from_bits(
6744            tmp & MavProtocolCapability::all().bits(),
6745        )
6746        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6747            flag_type: "MavProtocolCapability",
6748            value: tmp as u32,
6749        })?;
6750        __struct.uid = buf.get_u64_le();
6751        __struct.flight_sw_version = buf.get_u32_le();
6752        __struct.middleware_sw_version = buf.get_u32_le();
6753        __struct.os_sw_version = buf.get_u32_le();
6754        __struct.board_version = buf.get_u32_le();
6755        __struct.vendor_id = buf.get_u16_le();
6756        __struct.product_id = buf.get_u16_le();
6757        for v in &mut __struct.flight_custom_version {
6758            let val = buf.get_u8();
6759            *v = val;
6760        }
6761        for v in &mut __struct.middleware_custom_version {
6762            let val = buf.get_u8();
6763            *v = val;
6764        }
6765        for v in &mut __struct.os_custom_version {
6766            let val = buf.get_u8();
6767            *v = val;
6768        }
6769        for v in &mut __struct.uid2 {
6770            let val = buf.get_u8();
6771            *v = val;
6772        }
6773        Ok(__struct)
6774    }
6775    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6776        let mut __tmp = BytesMut::new(bytes);
6777        #[allow(clippy::absurd_extreme_comparisons)]
6778        #[allow(unused_comparisons)]
6779        if __tmp.remaining() < Self::ENCODED_LEN {
6780            panic!(
6781                "buffer is too small (need {} bytes, but got {})",
6782                Self::ENCODED_LEN,
6783                __tmp.remaining(),
6784            )
6785        }
6786        __tmp.put_u64_le(self.capabilities.bits());
6787        __tmp.put_u64_le(self.uid);
6788        __tmp.put_u32_le(self.flight_sw_version);
6789        __tmp.put_u32_le(self.middleware_sw_version);
6790        __tmp.put_u32_le(self.os_sw_version);
6791        __tmp.put_u32_le(self.board_version);
6792        __tmp.put_u16_le(self.vendor_id);
6793        __tmp.put_u16_le(self.product_id);
6794        for val in &self.flight_custom_version {
6795            __tmp.put_u8(*val);
6796        }
6797        for val in &self.middleware_custom_version {
6798            __tmp.put_u8(*val);
6799        }
6800        for val in &self.os_custom_version {
6801            __tmp.put_u8(*val);
6802        }
6803        if matches!(version, MavlinkVersion::V2) {
6804            for val in &self.uid2 {
6805                __tmp.put_u8(*val);
6806            }
6807            let len = __tmp.len();
6808            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6809        } else {
6810            __tmp.len()
6811        }
6812    }
6813}
6814#[doc = "Information about a flight mode.          The message can be enumerated to get information for all modes, or requested for a particular mode, using MAV_CMD_REQUEST_MESSAGE.         Specify 0 in param2 to request that the message is emitted for all available modes or the specific index for just one mode.         The modes must be available/settable for the current vehicle/frame type.         Each mode should only be emitted once (even if it is both standard and custom).         Note that the current mode should be emitted in CURRENT_MODE, and that if the mode list can change then AVAILABLE_MODES_MONITOR must be emitted on first change and subsequently streamed.         See <https://mavlink.io/en/services/standard_modes.html>."]
6815#[doc = ""]
6816#[doc = "ID: 435"]
6817#[derive(Debug, Clone, PartialEq)]
6818#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6819#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6820#[cfg_attr(feature = "ts", derive(TS))]
6821#[cfg_attr(feature = "ts", ts(export))]
6822pub struct AVAILABLE_MODES_DATA {
6823    #[doc = "A bitfield for use for autopilot-specific flags"]
6824    pub custom_mode: u32,
6825    #[doc = "Mode properties."]
6826    pub properties: MavModeProperty,
6827    #[doc = "The total number of available modes for the current vehicle type."]
6828    pub number_modes: u8,
6829    #[doc = "The current mode index within number_modes, indexed from 1. The index is not guaranteed to be persistent, and may change between reboots or if the set of modes change."]
6830    pub mode_index: u8,
6831    #[doc = "Standard mode."]
6832    pub standard_mode: MavStandardMode,
6833    #[doc = "Name of custom mode, with null termination character. Should be omitted for standard modes."]
6834    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6835    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6836    pub mode_name: [u8; 35],
6837}
6838impl AVAILABLE_MODES_DATA {
6839    pub const ENCODED_LEN: usize = 46usize;
6840    pub const DEFAULT: Self = Self {
6841        custom_mode: 0_u32,
6842        properties: MavModeProperty::DEFAULT,
6843        number_modes: 0_u8,
6844        mode_index: 0_u8,
6845        standard_mode: MavStandardMode::DEFAULT,
6846        mode_name: [0_u8; 35usize],
6847    };
6848    #[cfg(feature = "arbitrary")]
6849    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6850        use arbitrary::{Arbitrary, Unstructured};
6851        let mut buf = [0u8; 1024];
6852        rng.fill_bytes(&mut buf);
6853        let mut unstructured = Unstructured::new(&buf);
6854        Self::arbitrary(&mut unstructured).unwrap_or_default()
6855    }
6856}
6857impl Default for AVAILABLE_MODES_DATA {
6858    fn default() -> Self {
6859        Self::DEFAULT.clone()
6860    }
6861}
6862impl MessageData for AVAILABLE_MODES_DATA {
6863    type Message = MavMessage;
6864    const ID: u32 = 435u32;
6865    const NAME: &'static str = "AVAILABLE_MODES";
6866    const EXTRA_CRC: u8 = 134u8;
6867    const ENCODED_LEN: usize = 46usize;
6868    fn deser(
6869        _version: MavlinkVersion,
6870        __input: &[u8],
6871    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6872        let avail_len = __input.len();
6873        let mut payload_buf = [0; Self::ENCODED_LEN];
6874        let mut buf = if avail_len < Self::ENCODED_LEN {
6875            payload_buf[0..avail_len].copy_from_slice(__input);
6876            Bytes::new(&payload_buf)
6877        } else {
6878            Bytes::new(__input)
6879        };
6880        let mut __struct = Self::default();
6881        __struct.custom_mode = buf.get_u32_le();
6882        let tmp = buf.get_u32_le();
6883        __struct.properties = MavModeProperty::from_bits(tmp & MavModeProperty::all().bits())
6884            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6885                flag_type: "MavModeProperty",
6886                value: tmp as u32,
6887            })?;
6888        __struct.number_modes = buf.get_u8();
6889        __struct.mode_index = buf.get_u8();
6890        let tmp = buf.get_u8();
6891        __struct.standard_mode =
6892            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6893                enum_type: "MavStandardMode",
6894                value: tmp as u32,
6895            })?;
6896        for v in &mut __struct.mode_name {
6897            let val = buf.get_u8();
6898            *v = val;
6899        }
6900        Ok(__struct)
6901    }
6902    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6903        let mut __tmp = BytesMut::new(bytes);
6904        #[allow(clippy::absurd_extreme_comparisons)]
6905        #[allow(unused_comparisons)]
6906        if __tmp.remaining() < Self::ENCODED_LEN {
6907            panic!(
6908                "buffer is too small (need {} bytes, but got {})",
6909                Self::ENCODED_LEN,
6910                __tmp.remaining(),
6911            )
6912        }
6913        __tmp.put_u32_le(self.custom_mode);
6914        __tmp.put_u32_le(self.properties.bits());
6915        __tmp.put_u8(self.number_modes);
6916        __tmp.put_u8(self.mode_index);
6917        __tmp.put_u8(self.standard_mode as u8);
6918        for val in &self.mode_name {
6919            __tmp.put_u8(*val);
6920        }
6921        if matches!(version, MavlinkVersion::V2) {
6922            let len = __tmp.len();
6923            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6924        } else {
6925            __tmp.len()
6926        }
6927    }
6928}
6929#[doc = "A change to the sequence number indicates that the set of AVAILABLE_MODES has changed.         A receiver must re-request all available modes whenever the sequence number changes.         This is only emitted after the first change and should then be broadcast at low rate (nominally 0.3 Hz) and on change.         See <https://mavlink.io/en/services/standard_modes.html>."]
6930#[doc = ""]
6931#[doc = "ID: 437"]
6932#[derive(Debug, Clone, PartialEq)]
6933#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6934#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6935#[cfg_attr(feature = "ts", derive(TS))]
6936#[cfg_attr(feature = "ts", ts(export))]
6937pub struct AVAILABLE_MODES_MONITOR_DATA {
6938    #[doc = "Sequence number. The value iterates sequentially whenever AVAILABLE_MODES changes (e.g. support for a new mode is added/removed dynamically)."]
6939    pub seq: u8,
6940}
6941impl AVAILABLE_MODES_MONITOR_DATA {
6942    pub const ENCODED_LEN: usize = 1usize;
6943    pub const DEFAULT: Self = Self { seq: 0_u8 };
6944    #[cfg(feature = "arbitrary")]
6945    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6946        use arbitrary::{Arbitrary, Unstructured};
6947        let mut buf = [0u8; 1024];
6948        rng.fill_bytes(&mut buf);
6949        let mut unstructured = Unstructured::new(&buf);
6950        Self::arbitrary(&mut unstructured).unwrap_or_default()
6951    }
6952}
6953impl Default for AVAILABLE_MODES_MONITOR_DATA {
6954    fn default() -> Self {
6955        Self::DEFAULT.clone()
6956    }
6957}
6958impl MessageData for AVAILABLE_MODES_MONITOR_DATA {
6959    type Message = MavMessage;
6960    const ID: u32 = 437u32;
6961    const NAME: &'static str = "AVAILABLE_MODES_MONITOR";
6962    const EXTRA_CRC: u8 = 30u8;
6963    const ENCODED_LEN: usize = 1usize;
6964    fn deser(
6965        _version: MavlinkVersion,
6966        __input: &[u8],
6967    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6968        let avail_len = __input.len();
6969        let mut payload_buf = [0; Self::ENCODED_LEN];
6970        let mut buf = if avail_len < Self::ENCODED_LEN {
6971            payload_buf[0..avail_len].copy_from_slice(__input);
6972            Bytes::new(&payload_buf)
6973        } else {
6974            Bytes::new(__input)
6975        };
6976        let mut __struct = Self::default();
6977        __struct.seq = buf.get_u8();
6978        Ok(__struct)
6979    }
6980    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6981        let mut __tmp = BytesMut::new(bytes);
6982        #[allow(clippy::absurd_extreme_comparisons)]
6983        #[allow(unused_comparisons)]
6984        if __tmp.remaining() < Self::ENCODED_LEN {
6985            panic!(
6986                "buffer is too small (need {} bytes, but got {})",
6987                Self::ENCODED_LEN,
6988                __tmp.remaining(),
6989            )
6990        }
6991        __tmp.put_u8(self.seq);
6992        if matches!(version, MavlinkVersion::V2) {
6993            let len = __tmp.len();
6994            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6995        } else {
6996            __tmp.len()
6997        }
6998    }
6999}
7000#[doc = "Battery information that is static, or requires infrequent update.         This message should requested using MAV_CMD_REQUEST_MESSAGE and/or streamed at very low rate.         BATTERY_STATUS_V2 is used for higher-rate battery status information."]
7001#[doc = ""]
7002#[doc = "ID: 372"]
7003#[derive(Debug, Clone, PartialEq)]
7004#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7005#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7006#[cfg_attr(feature = "ts", derive(TS))]
7007#[cfg_attr(feature = "ts", ts(export))]
7008pub struct BATTERY_INFO_DATA {
7009    #[doc = "Minimum per-cell voltage when discharging. 0: field not provided."]
7010    pub discharge_minimum_voltage: f32,
7011    #[doc = "Minimum per-cell voltage when charging. 0: field not provided."]
7012    pub charging_minimum_voltage: f32,
7013    #[doc = "Minimum per-cell voltage when resting. 0: field not provided."]
7014    pub resting_minimum_voltage: f32,
7015    #[doc = "Maximum per-cell voltage when charged. 0: field not provided."]
7016    pub charging_maximum_voltage: f32,
7017    #[doc = "Maximum pack continuous charge current. 0: field not provided."]
7018    pub charging_maximum_current: f32,
7019    #[doc = "Battery nominal voltage. Used for conversion between Wh and Ah. 0: field not provided."]
7020    pub nominal_voltage: f32,
7021    #[doc = "Maximum pack discharge current. 0: field not provided."]
7022    pub discharge_maximum_current: f32,
7023    #[doc = "Maximum pack discharge burst current. 0: field not provided."]
7024    pub discharge_maximum_burst_current: f32,
7025    #[doc = "Fully charged design capacity. 0: field not provided."]
7026    pub design_capacity: f32,
7027    #[doc = "Predicted battery capacity when fully charged (accounting for battery degradation). NAN: field not provided."]
7028    pub full_charge_capacity: f32,
7029    #[doc = "Lifetime count of the number of charge/discharge cycles (<https://en.wikipedia.org/wiki/Charge_cycle>). UINT16_MAX: field not provided."]
7030    pub cycle_count: u16,
7031    #[doc = "Battery weight. 0: field not provided."]
7032    pub weight: u16,
7033    #[doc = "Battery ID"]
7034    pub id: u8,
7035    #[doc = "Function of the battery."]
7036    pub battery_function: MavBatteryFunction,
7037    #[doc = "Type (chemistry) of the battery."]
7038    pub mavtype: MavBatteryType,
7039    #[doc = "State of Health (SOH) estimate. Typically 100% at the time of manufacture and will decrease over time and use. -1: field not provided."]
7040    pub state_of_health: u8,
7041    #[doc = "Number of battery cells in series. 0: field not provided."]
7042    pub cells_in_series: u8,
7043    #[doc = "Manufacture date (DDMMYYYY) in ASCII characters, 0 terminated. All 0: field not provided."]
7044    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7045    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7046    pub manufacture_date: [u8; 9],
7047    #[doc = "Serial number in ASCII characters, 0 terminated. All 0: field not provided."]
7048    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7049    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7050    pub serial_number: [u8; 32],
7051    #[doc = "Battery device name. Formatted as manufacturer name then product name, separated with an underscore (in ASCII characters), 0 terminated. All 0: field not provided."]
7052    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7053    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7054    pub name: [u8; 50],
7055}
7056impl BATTERY_INFO_DATA {
7057    pub const ENCODED_LEN: usize = 140usize;
7058    pub const DEFAULT: Self = Self {
7059        discharge_minimum_voltage: 0.0_f32,
7060        charging_minimum_voltage: 0.0_f32,
7061        resting_minimum_voltage: 0.0_f32,
7062        charging_maximum_voltage: 0.0_f32,
7063        charging_maximum_current: 0.0_f32,
7064        nominal_voltage: 0.0_f32,
7065        discharge_maximum_current: 0.0_f32,
7066        discharge_maximum_burst_current: 0.0_f32,
7067        design_capacity: 0.0_f32,
7068        full_charge_capacity: 0.0_f32,
7069        cycle_count: 0_u16,
7070        weight: 0_u16,
7071        id: 0_u8,
7072        battery_function: MavBatteryFunction::DEFAULT,
7073        mavtype: MavBatteryType::DEFAULT,
7074        state_of_health: 0_u8,
7075        cells_in_series: 0_u8,
7076        manufacture_date: [0_u8; 9usize],
7077        serial_number: [0_u8; 32usize],
7078        name: [0_u8; 50usize],
7079    };
7080    #[cfg(feature = "arbitrary")]
7081    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7082        use arbitrary::{Arbitrary, Unstructured};
7083        let mut buf = [0u8; 1024];
7084        rng.fill_bytes(&mut buf);
7085        let mut unstructured = Unstructured::new(&buf);
7086        Self::arbitrary(&mut unstructured).unwrap_or_default()
7087    }
7088}
7089impl Default for BATTERY_INFO_DATA {
7090    fn default() -> Self {
7091        Self::DEFAULT.clone()
7092    }
7093}
7094impl MessageData for BATTERY_INFO_DATA {
7095    type Message = MavMessage;
7096    const ID: u32 = 372u32;
7097    const NAME: &'static str = "BATTERY_INFO";
7098    const EXTRA_CRC: u8 = 26u8;
7099    const ENCODED_LEN: usize = 140usize;
7100    fn deser(
7101        _version: MavlinkVersion,
7102        __input: &[u8],
7103    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7104        let avail_len = __input.len();
7105        let mut payload_buf = [0; Self::ENCODED_LEN];
7106        let mut buf = if avail_len < Self::ENCODED_LEN {
7107            payload_buf[0..avail_len].copy_from_slice(__input);
7108            Bytes::new(&payload_buf)
7109        } else {
7110            Bytes::new(__input)
7111        };
7112        let mut __struct = Self::default();
7113        __struct.discharge_minimum_voltage = buf.get_f32_le();
7114        __struct.charging_minimum_voltage = buf.get_f32_le();
7115        __struct.resting_minimum_voltage = buf.get_f32_le();
7116        __struct.charging_maximum_voltage = buf.get_f32_le();
7117        __struct.charging_maximum_current = buf.get_f32_le();
7118        __struct.nominal_voltage = buf.get_f32_le();
7119        __struct.discharge_maximum_current = buf.get_f32_le();
7120        __struct.discharge_maximum_burst_current = buf.get_f32_le();
7121        __struct.design_capacity = buf.get_f32_le();
7122        __struct.full_charge_capacity = buf.get_f32_le();
7123        __struct.cycle_count = buf.get_u16_le();
7124        __struct.weight = buf.get_u16_le();
7125        __struct.id = buf.get_u8();
7126        let tmp = buf.get_u8();
7127        __struct.battery_function =
7128            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7129                enum_type: "MavBatteryFunction",
7130                value: tmp as u32,
7131            })?;
7132        let tmp = buf.get_u8();
7133        __struct.mavtype =
7134            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7135                enum_type: "MavBatteryType",
7136                value: tmp as u32,
7137            })?;
7138        __struct.state_of_health = buf.get_u8();
7139        __struct.cells_in_series = buf.get_u8();
7140        for v in &mut __struct.manufacture_date {
7141            let val = buf.get_u8();
7142            *v = val;
7143        }
7144        for v in &mut __struct.serial_number {
7145            let val = buf.get_u8();
7146            *v = val;
7147        }
7148        for v in &mut __struct.name {
7149            let val = buf.get_u8();
7150            *v = val;
7151        }
7152        Ok(__struct)
7153    }
7154    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7155        let mut __tmp = BytesMut::new(bytes);
7156        #[allow(clippy::absurd_extreme_comparisons)]
7157        #[allow(unused_comparisons)]
7158        if __tmp.remaining() < Self::ENCODED_LEN {
7159            panic!(
7160                "buffer is too small (need {} bytes, but got {})",
7161                Self::ENCODED_LEN,
7162                __tmp.remaining(),
7163            )
7164        }
7165        __tmp.put_f32_le(self.discharge_minimum_voltage);
7166        __tmp.put_f32_le(self.charging_minimum_voltage);
7167        __tmp.put_f32_le(self.resting_minimum_voltage);
7168        __tmp.put_f32_le(self.charging_maximum_voltage);
7169        __tmp.put_f32_le(self.charging_maximum_current);
7170        __tmp.put_f32_le(self.nominal_voltage);
7171        __tmp.put_f32_le(self.discharge_maximum_current);
7172        __tmp.put_f32_le(self.discharge_maximum_burst_current);
7173        __tmp.put_f32_le(self.design_capacity);
7174        __tmp.put_f32_le(self.full_charge_capacity);
7175        __tmp.put_u16_le(self.cycle_count);
7176        __tmp.put_u16_le(self.weight);
7177        __tmp.put_u8(self.id);
7178        __tmp.put_u8(self.battery_function as u8);
7179        __tmp.put_u8(self.mavtype as u8);
7180        __tmp.put_u8(self.state_of_health);
7181        __tmp.put_u8(self.cells_in_series);
7182        for val in &self.manufacture_date {
7183            __tmp.put_u8(*val);
7184        }
7185        for val in &self.serial_number {
7186            __tmp.put_u8(*val);
7187        }
7188        for val in &self.name {
7189            __tmp.put_u8(*val);
7190        }
7191        if matches!(version, MavlinkVersion::V2) {
7192            let len = __tmp.len();
7193            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7194        } else {
7195            __tmp.len()
7196        }
7197    }
7198}
7199#[doc = "Battery information. Updates GCS with flight controller battery status. Smart batteries also use this message, but may additionally send BATTERY_INFO."]
7200#[doc = ""]
7201#[doc = "ID: 147"]
7202#[derive(Debug, Clone, PartialEq)]
7203#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7204#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7205#[cfg_attr(feature = "ts", derive(TS))]
7206#[cfg_attr(feature = "ts", ts(export))]
7207pub struct BATTERY_STATUS_DATA {
7208    #[doc = "Consumed charge, -1: autopilot does not provide consumption estimate"]
7209    pub current_consumed: i32,
7210    #[doc = "Consumed energy, -1: autopilot does not provide energy consumption estimate"]
7211    pub energy_consumed: i32,
7212    #[doc = "Temperature of the battery. INT16_MAX for unknown temperature."]
7213    pub temperature: i16,
7214    #[doc = "Battery voltage of cells 1 to 10 (see voltages_ext for cells 11-14). Cells in this field above the valid cell count for this battery should have the UINT16_MAX value. If individual cell voltages are unknown or not measured for this battery, then the overall battery voltage should be filled in cell 0, with all others set to UINT16_MAX. If the voltage of the battery is greater than (UINT16_MAX - 1), then cell 0 should be set to (UINT16_MAX - 1), and cell 1 to the remaining voltage. This can be extended to multiple cells if the total voltage is greater than 2 * (UINT16_MAX - 1)."]
7215    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7216    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7217    pub voltages: [u16; 10],
7218    #[doc = "Battery current, -1: autopilot does not measure the current"]
7219    pub current_battery: i16,
7220    #[doc = "Battery ID"]
7221    pub id: u8,
7222    #[doc = "Function of the battery"]
7223    pub battery_function: MavBatteryFunction,
7224    #[doc = "Type (chemistry) of the battery"]
7225    pub mavtype: MavBatteryType,
7226    #[doc = "Remaining battery energy. Values: [0-100], -1: autopilot does not estimate the remaining battery."]
7227    pub battery_remaining: i8,
7228    #[doc = "Remaining battery time, 0: autopilot does not provide remaining battery time estimate"]
7229    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7230    pub time_remaining: i32,
7231    #[doc = "State for extent of discharge, provided by autopilot for warning or external reactions"]
7232    #[cfg_attr(feature = "serde", serde(default))]
7233    pub charge_state: MavBatteryChargeState,
7234    #[doc = "Battery voltages for cells 11 to 14. Cells above the valid cell count for this battery should have a value of 0, where zero indicates not supported (note, this is different than for the voltages field and allows empty byte truncation). If the measured value is 0 then 1 should be sent instead."]
7235    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7236    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7237    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7238    pub voltages_ext: [u16; 4],
7239    #[doc = "Battery mode. Default (0) is that battery mode reporting is not supported or battery is in normal-use mode."]
7240    #[cfg_attr(feature = "serde", serde(default))]
7241    pub mode: MavBatteryMode,
7242    #[doc = "Fault/health indications. These should be set when charge_state is MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY (if not, fault reporting is not supported)."]
7243    #[cfg_attr(feature = "serde", serde(default))]
7244    pub fault_bitmask: MavBatteryFault,
7245}
7246impl BATTERY_STATUS_DATA {
7247    pub const ENCODED_LEN: usize = 54usize;
7248    pub const DEFAULT: Self = Self {
7249        current_consumed: 0_i32,
7250        energy_consumed: 0_i32,
7251        temperature: 0_i16,
7252        voltages: [0_u16; 10usize],
7253        current_battery: 0_i16,
7254        id: 0_u8,
7255        battery_function: MavBatteryFunction::DEFAULT,
7256        mavtype: MavBatteryType::DEFAULT,
7257        battery_remaining: 0_i8,
7258        time_remaining: 0_i32,
7259        charge_state: MavBatteryChargeState::DEFAULT,
7260        voltages_ext: [0_u16; 4usize],
7261        mode: MavBatteryMode::DEFAULT,
7262        fault_bitmask: MavBatteryFault::DEFAULT,
7263    };
7264    #[cfg(feature = "arbitrary")]
7265    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7266        use arbitrary::{Arbitrary, Unstructured};
7267        let mut buf = [0u8; 1024];
7268        rng.fill_bytes(&mut buf);
7269        let mut unstructured = Unstructured::new(&buf);
7270        Self::arbitrary(&mut unstructured).unwrap_or_default()
7271    }
7272}
7273impl Default for BATTERY_STATUS_DATA {
7274    fn default() -> Self {
7275        Self::DEFAULT.clone()
7276    }
7277}
7278impl MessageData for BATTERY_STATUS_DATA {
7279    type Message = MavMessage;
7280    const ID: u32 = 147u32;
7281    const NAME: &'static str = "BATTERY_STATUS";
7282    const EXTRA_CRC: u8 = 154u8;
7283    const ENCODED_LEN: usize = 54usize;
7284    fn deser(
7285        _version: MavlinkVersion,
7286        __input: &[u8],
7287    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7288        let avail_len = __input.len();
7289        let mut payload_buf = [0; Self::ENCODED_LEN];
7290        let mut buf = if avail_len < Self::ENCODED_LEN {
7291            payload_buf[0..avail_len].copy_from_slice(__input);
7292            Bytes::new(&payload_buf)
7293        } else {
7294            Bytes::new(__input)
7295        };
7296        let mut __struct = Self::default();
7297        __struct.current_consumed = buf.get_i32_le();
7298        __struct.energy_consumed = buf.get_i32_le();
7299        __struct.temperature = buf.get_i16_le();
7300        for v in &mut __struct.voltages {
7301            let val = buf.get_u16_le();
7302            *v = val;
7303        }
7304        __struct.current_battery = buf.get_i16_le();
7305        __struct.id = buf.get_u8();
7306        let tmp = buf.get_u8();
7307        __struct.battery_function =
7308            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7309                enum_type: "MavBatteryFunction",
7310                value: tmp as u32,
7311            })?;
7312        let tmp = buf.get_u8();
7313        __struct.mavtype =
7314            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7315                enum_type: "MavBatteryType",
7316                value: tmp as u32,
7317            })?;
7318        __struct.battery_remaining = buf.get_i8();
7319        __struct.time_remaining = buf.get_i32_le();
7320        let tmp = buf.get_u8();
7321        __struct.charge_state =
7322            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7323                enum_type: "MavBatteryChargeState",
7324                value: tmp as u32,
7325            })?;
7326        for v in &mut __struct.voltages_ext {
7327            let val = buf.get_u16_le();
7328            *v = val;
7329        }
7330        let tmp = buf.get_u8();
7331        __struct.mode =
7332            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7333                enum_type: "MavBatteryMode",
7334                value: tmp as u32,
7335            })?;
7336        let tmp = buf.get_u32_le();
7337        __struct.fault_bitmask = MavBatteryFault::from_bits(tmp & MavBatteryFault::all().bits())
7338            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
7339                flag_type: "MavBatteryFault",
7340                value: tmp as u32,
7341            })?;
7342        Ok(__struct)
7343    }
7344    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7345        let mut __tmp = BytesMut::new(bytes);
7346        #[allow(clippy::absurd_extreme_comparisons)]
7347        #[allow(unused_comparisons)]
7348        if __tmp.remaining() < Self::ENCODED_LEN {
7349            panic!(
7350                "buffer is too small (need {} bytes, but got {})",
7351                Self::ENCODED_LEN,
7352                __tmp.remaining(),
7353            )
7354        }
7355        __tmp.put_i32_le(self.current_consumed);
7356        __tmp.put_i32_le(self.energy_consumed);
7357        __tmp.put_i16_le(self.temperature);
7358        for val in &self.voltages {
7359            __tmp.put_u16_le(*val);
7360        }
7361        __tmp.put_i16_le(self.current_battery);
7362        __tmp.put_u8(self.id);
7363        __tmp.put_u8(self.battery_function as u8);
7364        __tmp.put_u8(self.mavtype as u8);
7365        __tmp.put_i8(self.battery_remaining);
7366        if matches!(version, MavlinkVersion::V2) {
7367            __tmp.put_i32_le(self.time_remaining);
7368            __tmp.put_u8(self.charge_state as u8);
7369            for val in &self.voltages_ext {
7370                __tmp.put_u16_le(*val);
7371            }
7372            __tmp.put_u8(self.mode as u8);
7373            __tmp.put_u32_le(self.fault_bitmask.bits());
7374            let len = __tmp.len();
7375            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7376        } else {
7377            __tmp.len()
7378        }
7379    }
7380}
7381#[doc = "Report button state change."]
7382#[doc = ""]
7383#[doc = "ID: 257"]
7384#[derive(Debug, Clone, PartialEq)]
7385#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7386#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7387#[cfg_attr(feature = "ts", derive(TS))]
7388#[cfg_attr(feature = "ts", ts(export))]
7389pub struct BUTTON_CHANGE_DATA {
7390    #[doc = "Timestamp (time since system boot)."]
7391    pub time_boot_ms: u32,
7392    #[doc = "Time of last change of button state."]
7393    pub last_change_ms: u32,
7394    #[doc = "Bitmap for state of buttons."]
7395    pub state: u8,
7396}
7397impl BUTTON_CHANGE_DATA {
7398    pub const ENCODED_LEN: usize = 9usize;
7399    pub const DEFAULT: Self = Self {
7400        time_boot_ms: 0_u32,
7401        last_change_ms: 0_u32,
7402        state: 0_u8,
7403    };
7404    #[cfg(feature = "arbitrary")]
7405    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7406        use arbitrary::{Arbitrary, Unstructured};
7407        let mut buf = [0u8; 1024];
7408        rng.fill_bytes(&mut buf);
7409        let mut unstructured = Unstructured::new(&buf);
7410        Self::arbitrary(&mut unstructured).unwrap_or_default()
7411    }
7412}
7413impl Default for BUTTON_CHANGE_DATA {
7414    fn default() -> Self {
7415        Self::DEFAULT.clone()
7416    }
7417}
7418impl MessageData for BUTTON_CHANGE_DATA {
7419    type Message = MavMessage;
7420    const ID: u32 = 257u32;
7421    const NAME: &'static str = "BUTTON_CHANGE";
7422    const EXTRA_CRC: u8 = 131u8;
7423    const ENCODED_LEN: usize = 9usize;
7424    fn deser(
7425        _version: MavlinkVersion,
7426        __input: &[u8],
7427    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7428        let avail_len = __input.len();
7429        let mut payload_buf = [0; Self::ENCODED_LEN];
7430        let mut buf = if avail_len < Self::ENCODED_LEN {
7431            payload_buf[0..avail_len].copy_from_slice(__input);
7432            Bytes::new(&payload_buf)
7433        } else {
7434            Bytes::new(__input)
7435        };
7436        let mut __struct = Self::default();
7437        __struct.time_boot_ms = buf.get_u32_le();
7438        __struct.last_change_ms = buf.get_u32_le();
7439        __struct.state = buf.get_u8();
7440        Ok(__struct)
7441    }
7442    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7443        let mut __tmp = BytesMut::new(bytes);
7444        #[allow(clippy::absurd_extreme_comparisons)]
7445        #[allow(unused_comparisons)]
7446        if __tmp.remaining() < Self::ENCODED_LEN {
7447            panic!(
7448                "buffer is too small (need {} bytes, but got {})",
7449                Self::ENCODED_LEN,
7450                __tmp.remaining(),
7451            )
7452        }
7453        __tmp.put_u32_le(self.time_boot_ms);
7454        __tmp.put_u32_le(self.last_change_ms);
7455        __tmp.put_u8(self.state);
7456        if matches!(version, MavlinkVersion::V2) {
7457            let len = __tmp.len();
7458            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7459        } else {
7460            __tmp.len()
7461        }
7462    }
7463}
7464#[doc = "Information about the status of a capture. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7465#[doc = ""]
7466#[doc = "ID: 262"]
7467#[derive(Debug, Clone, PartialEq)]
7468#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7469#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7470#[cfg_attr(feature = "ts", derive(TS))]
7471#[cfg_attr(feature = "ts", ts(export))]
7472pub struct CAMERA_CAPTURE_STATUS_DATA {
7473    #[doc = "Timestamp (time since system boot)."]
7474    pub time_boot_ms: u32,
7475    #[doc = "Image capture interval"]
7476    pub image_interval: f32,
7477    #[doc = "Elapsed time since recording started (0: Not supported/available). A GCS should compute recording time and use non-zero values of this field to correct any discrepancy."]
7478    pub recording_time_ms: u32,
7479    #[doc = "Available storage capacity."]
7480    pub available_capacity: f32,
7481    #[doc = "Current status of image capturing (0: idle, 1: capture in progress, 2: interval set but idle, 3: interval set and capture in progress)"]
7482    pub image_status: u8,
7483    #[doc = "Current status of video capturing (0: idle, 1: capture in progress)"]
7484    pub video_status: u8,
7485    #[doc = "Total number of images captured ('forever', or until reset using MAV_CMD_STORAGE_FORMAT)."]
7486    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7487    pub image_count: i32,
7488    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7489    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7490    pub camera_device_id: u8,
7491}
7492impl CAMERA_CAPTURE_STATUS_DATA {
7493    pub const ENCODED_LEN: usize = 23usize;
7494    pub const DEFAULT: Self = Self {
7495        time_boot_ms: 0_u32,
7496        image_interval: 0.0_f32,
7497        recording_time_ms: 0_u32,
7498        available_capacity: 0.0_f32,
7499        image_status: 0_u8,
7500        video_status: 0_u8,
7501        image_count: 0_i32,
7502        camera_device_id: 0_u8,
7503    };
7504    #[cfg(feature = "arbitrary")]
7505    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7506        use arbitrary::{Arbitrary, Unstructured};
7507        let mut buf = [0u8; 1024];
7508        rng.fill_bytes(&mut buf);
7509        let mut unstructured = Unstructured::new(&buf);
7510        Self::arbitrary(&mut unstructured).unwrap_or_default()
7511    }
7512}
7513impl Default for CAMERA_CAPTURE_STATUS_DATA {
7514    fn default() -> Self {
7515        Self::DEFAULT.clone()
7516    }
7517}
7518impl MessageData for CAMERA_CAPTURE_STATUS_DATA {
7519    type Message = MavMessage;
7520    const ID: u32 = 262u32;
7521    const NAME: &'static str = "CAMERA_CAPTURE_STATUS";
7522    const EXTRA_CRC: u8 = 12u8;
7523    const ENCODED_LEN: usize = 23usize;
7524    fn deser(
7525        _version: MavlinkVersion,
7526        __input: &[u8],
7527    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7528        let avail_len = __input.len();
7529        let mut payload_buf = [0; Self::ENCODED_LEN];
7530        let mut buf = if avail_len < Self::ENCODED_LEN {
7531            payload_buf[0..avail_len].copy_from_slice(__input);
7532            Bytes::new(&payload_buf)
7533        } else {
7534            Bytes::new(__input)
7535        };
7536        let mut __struct = Self::default();
7537        __struct.time_boot_ms = buf.get_u32_le();
7538        __struct.image_interval = buf.get_f32_le();
7539        __struct.recording_time_ms = buf.get_u32_le();
7540        __struct.available_capacity = buf.get_f32_le();
7541        __struct.image_status = buf.get_u8();
7542        __struct.video_status = buf.get_u8();
7543        __struct.image_count = buf.get_i32_le();
7544        __struct.camera_device_id = buf.get_u8();
7545        Ok(__struct)
7546    }
7547    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7548        let mut __tmp = BytesMut::new(bytes);
7549        #[allow(clippy::absurd_extreme_comparisons)]
7550        #[allow(unused_comparisons)]
7551        if __tmp.remaining() < Self::ENCODED_LEN {
7552            panic!(
7553                "buffer is too small (need {} bytes, but got {})",
7554                Self::ENCODED_LEN,
7555                __tmp.remaining(),
7556            )
7557        }
7558        __tmp.put_u32_le(self.time_boot_ms);
7559        __tmp.put_f32_le(self.image_interval);
7560        __tmp.put_u32_le(self.recording_time_ms);
7561        __tmp.put_f32_le(self.available_capacity);
7562        __tmp.put_u8(self.image_status);
7563        __tmp.put_u8(self.video_status);
7564        if matches!(version, MavlinkVersion::V2) {
7565            __tmp.put_i32_le(self.image_count);
7566            __tmp.put_u8(self.camera_device_id);
7567            let len = __tmp.len();
7568            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7569        } else {
7570            __tmp.len()
7571        }
7572    }
7573}
7574#[doc = "Information about the field of view of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7575#[doc = ""]
7576#[doc = "ID: 271"]
7577#[derive(Debug, Clone, PartialEq)]
7578#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7579#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7580#[cfg_attr(feature = "ts", derive(TS))]
7581#[cfg_attr(feature = "ts", ts(export))]
7582pub struct CAMERA_FOV_STATUS_DATA {
7583    #[doc = "Timestamp (time since system boot)."]
7584    pub time_boot_ms: u32,
7585    #[doc = "Latitude of camera (INT32_MAX if unknown)."]
7586    pub lat_camera: i32,
7587    #[doc = "Longitude of camera (INT32_MAX if unknown)."]
7588    pub lon_camera: i32,
7589    #[doc = "Altitude (MSL) of camera (INT32_MAX if unknown)."]
7590    pub alt_camera: i32,
7591    #[doc = "Latitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
7592    pub lat_image: i32,
7593    #[doc = "Longitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
7594    pub lon_image: i32,
7595    #[doc = "Altitude (MSL) of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
7596    pub alt_image: i32,
7597    #[doc = "Quaternion of camera orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
7598    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7599    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7600    pub q: [f32; 4],
7601    #[doc = "Horizontal field of view (NaN if unknown)."]
7602    pub hfov: f32,
7603    #[doc = "Vertical field of view (NaN if unknown)."]
7604    pub vfov: f32,
7605    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7606    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7607    pub camera_device_id: u8,
7608}
7609impl CAMERA_FOV_STATUS_DATA {
7610    pub const ENCODED_LEN: usize = 53usize;
7611    pub const DEFAULT: Self = Self {
7612        time_boot_ms: 0_u32,
7613        lat_camera: 0_i32,
7614        lon_camera: 0_i32,
7615        alt_camera: 0_i32,
7616        lat_image: 0_i32,
7617        lon_image: 0_i32,
7618        alt_image: 0_i32,
7619        q: [0.0_f32; 4usize],
7620        hfov: 0.0_f32,
7621        vfov: 0.0_f32,
7622        camera_device_id: 0_u8,
7623    };
7624    #[cfg(feature = "arbitrary")]
7625    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7626        use arbitrary::{Arbitrary, Unstructured};
7627        let mut buf = [0u8; 1024];
7628        rng.fill_bytes(&mut buf);
7629        let mut unstructured = Unstructured::new(&buf);
7630        Self::arbitrary(&mut unstructured).unwrap_or_default()
7631    }
7632}
7633impl Default for CAMERA_FOV_STATUS_DATA {
7634    fn default() -> Self {
7635        Self::DEFAULT.clone()
7636    }
7637}
7638impl MessageData for CAMERA_FOV_STATUS_DATA {
7639    type Message = MavMessage;
7640    const ID: u32 = 271u32;
7641    const NAME: &'static str = "CAMERA_FOV_STATUS";
7642    const EXTRA_CRC: u8 = 22u8;
7643    const ENCODED_LEN: usize = 53usize;
7644    fn deser(
7645        _version: MavlinkVersion,
7646        __input: &[u8],
7647    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7648        let avail_len = __input.len();
7649        let mut payload_buf = [0; Self::ENCODED_LEN];
7650        let mut buf = if avail_len < Self::ENCODED_LEN {
7651            payload_buf[0..avail_len].copy_from_slice(__input);
7652            Bytes::new(&payload_buf)
7653        } else {
7654            Bytes::new(__input)
7655        };
7656        let mut __struct = Self::default();
7657        __struct.time_boot_ms = buf.get_u32_le();
7658        __struct.lat_camera = buf.get_i32_le();
7659        __struct.lon_camera = buf.get_i32_le();
7660        __struct.alt_camera = buf.get_i32_le();
7661        __struct.lat_image = buf.get_i32_le();
7662        __struct.lon_image = buf.get_i32_le();
7663        __struct.alt_image = buf.get_i32_le();
7664        for v in &mut __struct.q {
7665            let val = buf.get_f32_le();
7666            *v = val;
7667        }
7668        __struct.hfov = buf.get_f32_le();
7669        __struct.vfov = buf.get_f32_le();
7670        __struct.camera_device_id = buf.get_u8();
7671        Ok(__struct)
7672    }
7673    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7674        let mut __tmp = BytesMut::new(bytes);
7675        #[allow(clippy::absurd_extreme_comparisons)]
7676        #[allow(unused_comparisons)]
7677        if __tmp.remaining() < Self::ENCODED_LEN {
7678            panic!(
7679                "buffer is too small (need {} bytes, but got {})",
7680                Self::ENCODED_LEN,
7681                __tmp.remaining(),
7682            )
7683        }
7684        __tmp.put_u32_le(self.time_boot_ms);
7685        __tmp.put_i32_le(self.lat_camera);
7686        __tmp.put_i32_le(self.lon_camera);
7687        __tmp.put_i32_le(self.alt_camera);
7688        __tmp.put_i32_le(self.lat_image);
7689        __tmp.put_i32_le(self.lon_image);
7690        __tmp.put_i32_le(self.alt_image);
7691        for val in &self.q {
7692            __tmp.put_f32_le(*val);
7693        }
7694        __tmp.put_f32_le(self.hfov);
7695        __tmp.put_f32_le(self.vfov);
7696        if matches!(version, MavlinkVersion::V2) {
7697            __tmp.put_u8(self.camera_device_id);
7698            let len = __tmp.len();
7699            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7700        } else {
7701            __tmp.len()
7702        }
7703    }
7704}
7705#[doc = "Information about a captured image. This is emitted every time a message is captured.         MAV_CMD_REQUEST_MESSAGE can be used to (re)request this message for a specific sequence number or range of sequence numbers:         MAV_CMD_REQUEST_MESSAGE.param2 indicates the sequence number the first image to send, or set to -1 to send the message for all sequence numbers.         MAV_CMD_REQUEST_MESSAGE.param3 is used to specify a range of messages to send:         set to 0 (default) to send just the the message for the sequence number in param 2,         set to -1 to send the message for the sequence number in param 2 and all the following sequence numbers,         set to the sequence number of the final message in the range."]
7706#[doc = ""]
7707#[doc = "ID: 263"]
7708#[derive(Debug, Clone, PartialEq)]
7709#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7710#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7711#[cfg_attr(feature = "ts", derive(TS))]
7712#[cfg_attr(feature = "ts", ts(export))]
7713pub struct CAMERA_IMAGE_CAPTURED_DATA {
7714    #[doc = "Timestamp (time since UNIX epoch) in UTC. 0 for unknown."]
7715    pub time_utc: u64,
7716    #[doc = "Timestamp (time since system boot)."]
7717    pub time_boot_ms: u32,
7718    #[doc = "Latitude where image was taken"]
7719    pub lat: i32,
7720    #[doc = "Longitude where capture was taken"]
7721    pub lon: i32,
7722    #[doc = "Altitude (MSL) where image was taken"]
7723    pub alt: i32,
7724    #[doc = "Altitude above ground"]
7725    pub relative_alt: i32,
7726    #[doc = "Quaternion of camera orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
7727    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7728    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7729    pub q: [f32; 4],
7730    #[doc = "Zero based index of this image (i.e. a new image will have index CAMERA_CAPTURE_STATUS.image count -1)"]
7731    pub image_index: i32,
7732    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id). Field name is usually camera_device_id."]
7733    pub camera_id: u8,
7734    #[doc = "Boolean indicating success (1) or failure (0) while capturing this image."]
7735    pub capture_result: i8,
7736    #[doc = "URL of image taken. Either local storage or <http://foo.jpg> if camera provides an HTTP interface."]
7737    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7738    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7739    pub file_url: [u8; 205],
7740}
7741impl CAMERA_IMAGE_CAPTURED_DATA {
7742    pub const ENCODED_LEN: usize = 255usize;
7743    pub const DEFAULT: Self = Self {
7744        time_utc: 0_u64,
7745        time_boot_ms: 0_u32,
7746        lat: 0_i32,
7747        lon: 0_i32,
7748        alt: 0_i32,
7749        relative_alt: 0_i32,
7750        q: [0.0_f32; 4usize],
7751        image_index: 0_i32,
7752        camera_id: 0_u8,
7753        capture_result: 0_i8,
7754        file_url: [0_u8; 205usize],
7755    };
7756    #[cfg(feature = "arbitrary")]
7757    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7758        use arbitrary::{Arbitrary, Unstructured};
7759        let mut buf = [0u8; 1024];
7760        rng.fill_bytes(&mut buf);
7761        let mut unstructured = Unstructured::new(&buf);
7762        Self::arbitrary(&mut unstructured).unwrap_or_default()
7763    }
7764}
7765impl Default for CAMERA_IMAGE_CAPTURED_DATA {
7766    fn default() -> Self {
7767        Self::DEFAULT.clone()
7768    }
7769}
7770impl MessageData for CAMERA_IMAGE_CAPTURED_DATA {
7771    type Message = MavMessage;
7772    const ID: u32 = 263u32;
7773    const NAME: &'static str = "CAMERA_IMAGE_CAPTURED";
7774    const EXTRA_CRC: u8 = 133u8;
7775    const ENCODED_LEN: usize = 255usize;
7776    fn deser(
7777        _version: MavlinkVersion,
7778        __input: &[u8],
7779    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7780        let avail_len = __input.len();
7781        let mut payload_buf = [0; Self::ENCODED_LEN];
7782        let mut buf = if avail_len < Self::ENCODED_LEN {
7783            payload_buf[0..avail_len].copy_from_slice(__input);
7784            Bytes::new(&payload_buf)
7785        } else {
7786            Bytes::new(__input)
7787        };
7788        let mut __struct = Self::default();
7789        __struct.time_utc = buf.get_u64_le();
7790        __struct.time_boot_ms = buf.get_u32_le();
7791        __struct.lat = buf.get_i32_le();
7792        __struct.lon = buf.get_i32_le();
7793        __struct.alt = buf.get_i32_le();
7794        __struct.relative_alt = buf.get_i32_le();
7795        for v in &mut __struct.q {
7796            let val = buf.get_f32_le();
7797            *v = val;
7798        }
7799        __struct.image_index = buf.get_i32_le();
7800        __struct.camera_id = buf.get_u8();
7801        __struct.capture_result = buf.get_i8();
7802        for v in &mut __struct.file_url {
7803            let val = buf.get_u8();
7804            *v = val;
7805        }
7806        Ok(__struct)
7807    }
7808    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7809        let mut __tmp = BytesMut::new(bytes);
7810        #[allow(clippy::absurd_extreme_comparisons)]
7811        #[allow(unused_comparisons)]
7812        if __tmp.remaining() < Self::ENCODED_LEN {
7813            panic!(
7814                "buffer is too small (need {} bytes, but got {})",
7815                Self::ENCODED_LEN,
7816                __tmp.remaining(),
7817            )
7818        }
7819        __tmp.put_u64_le(self.time_utc);
7820        __tmp.put_u32_le(self.time_boot_ms);
7821        __tmp.put_i32_le(self.lat);
7822        __tmp.put_i32_le(self.lon);
7823        __tmp.put_i32_le(self.alt);
7824        __tmp.put_i32_le(self.relative_alt);
7825        for val in &self.q {
7826            __tmp.put_f32_le(*val);
7827        }
7828        __tmp.put_i32_le(self.image_index);
7829        __tmp.put_u8(self.camera_id);
7830        __tmp.put_i8(self.capture_result);
7831        for val in &self.file_url {
7832            __tmp.put_u8(*val);
7833        }
7834        if matches!(version, MavlinkVersion::V2) {
7835            let len = __tmp.len();
7836            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7837        } else {
7838            __tmp.len()
7839        }
7840    }
7841}
7842#[doc = "Information about a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7843#[doc = ""]
7844#[doc = "ID: 259"]
7845#[derive(Debug, Clone, PartialEq)]
7846#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7847#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7848#[cfg_attr(feature = "ts", derive(TS))]
7849#[cfg_attr(feature = "ts", ts(export))]
7850pub struct CAMERA_INFORMATION_DATA {
7851    #[doc = "Timestamp (time since system boot)."]
7852    pub time_boot_ms: u32,
7853    #[doc = "0xff). Use 0 if not known."]
7854    pub firmware_version: u32,
7855    #[doc = "Focal length. Use NaN if not known."]
7856    pub focal_length: f32,
7857    #[doc = "Image sensor size horizontal. Use NaN if not known."]
7858    pub sensor_size_h: f32,
7859    #[doc = "Image sensor size vertical. Use NaN if not known."]
7860    pub sensor_size_v: f32,
7861    #[doc = "Bitmap of camera capability flags."]
7862    pub flags: CameraCapFlags,
7863    #[doc = "Horizontal image resolution. Use 0 if not known."]
7864    pub resolution_h: u16,
7865    #[doc = "Vertical image resolution. Use 0 if not known."]
7866    pub resolution_v: u16,
7867    #[doc = "Camera definition version (iteration).  Use 0 if not known."]
7868    pub cam_definition_version: u16,
7869    #[doc = "Name of the camera vendor"]
7870    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7871    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7872    pub vendor_name: [u8; 32],
7873    #[doc = "Name of the camera model"]
7874    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7875    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7876    pub model_name: [u8; 32],
7877    #[doc = "Reserved for a lens ID.  Use 0 if not known."]
7878    pub lens_id: u8,
7879    #[doc = "Camera definition URI (if any, otherwise only basic functions will be available). HTTP- (http://) and MAVLink FTP- (mavlinkftp://) formatted URIs are allowed (and both must be supported by any GCS that implements the Camera Protocol). The definition file may be xz compressed, which will be indicated by the file extension .xml.xz (a GCS that implements the protocol must support decompressing the file). The string needs to be zero terminated.  Use a zero-length string if not known."]
7880    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7881    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7882    pub cam_definition_uri: [u8; 140],
7883    #[doc = "Gimbal id of a gimbal associated with this camera. This is the component id of the gimbal device, or 1-6 for non mavlink gimbals. Use 0 if no gimbal is associated with the camera."]
7884    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7885    pub gimbal_device_id: u8,
7886    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7887    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7888    pub camera_device_id: u8,
7889}
7890impl CAMERA_INFORMATION_DATA {
7891    pub const ENCODED_LEN: usize = 237usize;
7892    pub const DEFAULT: Self = Self {
7893        time_boot_ms: 0_u32,
7894        firmware_version: 0_u32,
7895        focal_length: 0.0_f32,
7896        sensor_size_h: 0.0_f32,
7897        sensor_size_v: 0.0_f32,
7898        flags: CameraCapFlags::DEFAULT,
7899        resolution_h: 0_u16,
7900        resolution_v: 0_u16,
7901        cam_definition_version: 0_u16,
7902        vendor_name: [0_u8; 32usize],
7903        model_name: [0_u8; 32usize],
7904        lens_id: 0_u8,
7905        cam_definition_uri: [0_u8; 140usize],
7906        gimbal_device_id: 0_u8,
7907        camera_device_id: 0_u8,
7908    };
7909    #[cfg(feature = "arbitrary")]
7910    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7911        use arbitrary::{Arbitrary, Unstructured};
7912        let mut buf = [0u8; 1024];
7913        rng.fill_bytes(&mut buf);
7914        let mut unstructured = Unstructured::new(&buf);
7915        Self::arbitrary(&mut unstructured).unwrap_or_default()
7916    }
7917}
7918impl Default for CAMERA_INFORMATION_DATA {
7919    fn default() -> Self {
7920        Self::DEFAULT.clone()
7921    }
7922}
7923impl MessageData for CAMERA_INFORMATION_DATA {
7924    type Message = MavMessage;
7925    const ID: u32 = 259u32;
7926    const NAME: &'static str = "CAMERA_INFORMATION";
7927    const EXTRA_CRC: u8 = 92u8;
7928    const ENCODED_LEN: usize = 237usize;
7929    fn deser(
7930        _version: MavlinkVersion,
7931        __input: &[u8],
7932    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7933        let avail_len = __input.len();
7934        let mut payload_buf = [0; Self::ENCODED_LEN];
7935        let mut buf = if avail_len < Self::ENCODED_LEN {
7936            payload_buf[0..avail_len].copy_from_slice(__input);
7937            Bytes::new(&payload_buf)
7938        } else {
7939            Bytes::new(__input)
7940        };
7941        let mut __struct = Self::default();
7942        __struct.time_boot_ms = buf.get_u32_le();
7943        __struct.firmware_version = buf.get_u32_le();
7944        __struct.focal_length = buf.get_f32_le();
7945        __struct.sensor_size_h = buf.get_f32_le();
7946        __struct.sensor_size_v = buf.get_f32_le();
7947        let tmp = buf.get_u32_le();
7948        __struct.flags = CameraCapFlags::from_bits(tmp & CameraCapFlags::all().bits()).ok_or(
7949            ::mavlink_core::error::ParserError::InvalidFlag {
7950                flag_type: "CameraCapFlags",
7951                value: tmp as u32,
7952            },
7953        )?;
7954        __struct.resolution_h = buf.get_u16_le();
7955        __struct.resolution_v = buf.get_u16_le();
7956        __struct.cam_definition_version = buf.get_u16_le();
7957        for v in &mut __struct.vendor_name {
7958            let val = buf.get_u8();
7959            *v = val;
7960        }
7961        for v in &mut __struct.model_name {
7962            let val = buf.get_u8();
7963            *v = val;
7964        }
7965        __struct.lens_id = buf.get_u8();
7966        for v in &mut __struct.cam_definition_uri {
7967            let val = buf.get_u8();
7968            *v = val;
7969        }
7970        __struct.gimbal_device_id = buf.get_u8();
7971        __struct.camera_device_id = buf.get_u8();
7972        Ok(__struct)
7973    }
7974    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7975        let mut __tmp = BytesMut::new(bytes);
7976        #[allow(clippy::absurd_extreme_comparisons)]
7977        #[allow(unused_comparisons)]
7978        if __tmp.remaining() < Self::ENCODED_LEN {
7979            panic!(
7980                "buffer is too small (need {} bytes, but got {})",
7981                Self::ENCODED_LEN,
7982                __tmp.remaining(),
7983            )
7984        }
7985        __tmp.put_u32_le(self.time_boot_ms);
7986        __tmp.put_u32_le(self.firmware_version);
7987        __tmp.put_f32_le(self.focal_length);
7988        __tmp.put_f32_le(self.sensor_size_h);
7989        __tmp.put_f32_le(self.sensor_size_v);
7990        __tmp.put_u32_le(self.flags.bits());
7991        __tmp.put_u16_le(self.resolution_h);
7992        __tmp.put_u16_le(self.resolution_v);
7993        __tmp.put_u16_le(self.cam_definition_version);
7994        for val in &self.vendor_name {
7995            __tmp.put_u8(*val);
7996        }
7997        for val in &self.model_name {
7998            __tmp.put_u8(*val);
7999        }
8000        __tmp.put_u8(self.lens_id);
8001        for val in &self.cam_definition_uri {
8002            __tmp.put_u8(*val);
8003        }
8004        if matches!(version, MavlinkVersion::V2) {
8005            __tmp.put_u8(self.gimbal_device_id);
8006            __tmp.put_u8(self.camera_device_id);
8007            let len = __tmp.len();
8008            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8009        } else {
8010            __tmp.len()
8011        }
8012    }
8013}
8014#[doc = "Settings of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
8015#[doc = ""]
8016#[doc = "ID: 260"]
8017#[derive(Debug, Clone, PartialEq)]
8018#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8019#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8020#[cfg_attr(feature = "ts", derive(TS))]
8021#[cfg_attr(feature = "ts", ts(export))]
8022pub struct CAMERA_SETTINGS_DATA {
8023    #[doc = "Timestamp (time since system boot)."]
8024    pub time_boot_ms: u32,
8025    #[doc = "Camera mode"]
8026    pub mode_id: CameraMode,
8027    #[doc = "Current zoom level as a percentage of the full range (0.0 to 100.0, NaN if not known)"]
8028    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8029    pub zoomLevel: f32,
8030    #[doc = "Current focus level as a percentage of the full range (0.0 to 100.0, NaN if not known)"]
8031    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8032    pub focusLevel: f32,
8033    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
8034    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8035    pub camera_device_id: u8,
8036}
8037impl CAMERA_SETTINGS_DATA {
8038    pub const ENCODED_LEN: usize = 14usize;
8039    pub const DEFAULT: Self = Self {
8040        time_boot_ms: 0_u32,
8041        mode_id: CameraMode::DEFAULT,
8042        zoomLevel: 0.0_f32,
8043        focusLevel: 0.0_f32,
8044        camera_device_id: 0_u8,
8045    };
8046    #[cfg(feature = "arbitrary")]
8047    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8048        use arbitrary::{Arbitrary, Unstructured};
8049        let mut buf = [0u8; 1024];
8050        rng.fill_bytes(&mut buf);
8051        let mut unstructured = Unstructured::new(&buf);
8052        Self::arbitrary(&mut unstructured).unwrap_or_default()
8053    }
8054}
8055impl Default for CAMERA_SETTINGS_DATA {
8056    fn default() -> Self {
8057        Self::DEFAULT.clone()
8058    }
8059}
8060impl MessageData for CAMERA_SETTINGS_DATA {
8061    type Message = MavMessage;
8062    const ID: u32 = 260u32;
8063    const NAME: &'static str = "CAMERA_SETTINGS";
8064    const EXTRA_CRC: u8 = 146u8;
8065    const ENCODED_LEN: usize = 14usize;
8066    fn deser(
8067        _version: MavlinkVersion,
8068        __input: &[u8],
8069    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8070        let avail_len = __input.len();
8071        let mut payload_buf = [0; Self::ENCODED_LEN];
8072        let mut buf = if avail_len < Self::ENCODED_LEN {
8073            payload_buf[0..avail_len].copy_from_slice(__input);
8074            Bytes::new(&payload_buf)
8075        } else {
8076            Bytes::new(__input)
8077        };
8078        let mut __struct = Self::default();
8079        __struct.time_boot_ms = buf.get_u32_le();
8080        let tmp = buf.get_u8();
8081        __struct.mode_id =
8082            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8083                enum_type: "CameraMode",
8084                value: tmp as u32,
8085            })?;
8086        __struct.zoomLevel = buf.get_f32_le();
8087        __struct.focusLevel = buf.get_f32_le();
8088        __struct.camera_device_id = buf.get_u8();
8089        Ok(__struct)
8090    }
8091    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8092        let mut __tmp = BytesMut::new(bytes);
8093        #[allow(clippy::absurd_extreme_comparisons)]
8094        #[allow(unused_comparisons)]
8095        if __tmp.remaining() < Self::ENCODED_LEN {
8096            panic!(
8097                "buffer is too small (need {} bytes, but got {})",
8098                Self::ENCODED_LEN,
8099                __tmp.remaining(),
8100            )
8101        }
8102        __tmp.put_u32_le(self.time_boot_ms);
8103        __tmp.put_u8(self.mode_id as u8);
8104        if matches!(version, MavlinkVersion::V2) {
8105            __tmp.put_f32_le(self.zoomLevel);
8106            __tmp.put_f32_le(self.focusLevel);
8107            __tmp.put_u8(self.camera_device_id);
8108            let len = __tmp.len();
8109            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8110        } else {
8111            __tmp.len()
8112        }
8113    }
8114}
8115#[doc = "Camera absolute thermal range. This can be streamed when the associated VIDEO_STREAM_STATUS `flag` field bit VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED is set, but a GCS may choose to only request it for the current active stream. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval (param3 indicates the stream id of the current camera, or 0 for all streams, param4 indicates the target camera_device_id for autopilot-attached cameras or 0 for MAVLink cameras)."]
8116#[doc = ""]
8117#[doc = "ID: 277"]
8118#[derive(Debug, Clone, PartialEq)]
8119#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8120#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8121#[cfg_attr(feature = "ts", derive(TS))]
8122#[cfg_attr(feature = "ts", ts(export))]
8123pub struct CAMERA_THERMAL_RANGE_DATA {
8124    #[doc = "Timestamp (time since system boot)."]
8125    pub time_boot_ms: u32,
8126    #[doc = "Temperature max."]
8127    pub max: f32,
8128    #[doc = "Temperature max point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown."]
8129    pub max_point_x: f32,
8130    #[doc = "Temperature max point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown."]
8131    pub max_point_y: f32,
8132    #[doc = "Temperature min."]
8133    pub min: f32,
8134    #[doc = "Temperature min point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown."]
8135    pub min_point_x: f32,
8136    #[doc = "Temperature min point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown."]
8137    pub min_point_y: f32,
8138    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
8139    pub stream_id: u8,
8140    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
8141    pub camera_device_id: u8,
8142}
8143impl CAMERA_THERMAL_RANGE_DATA {
8144    pub const ENCODED_LEN: usize = 30usize;
8145    pub const DEFAULT: Self = Self {
8146        time_boot_ms: 0_u32,
8147        max: 0.0_f32,
8148        max_point_x: 0.0_f32,
8149        max_point_y: 0.0_f32,
8150        min: 0.0_f32,
8151        min_point_x: 0.0_f32,
8152        min_point_y: 0.0_f32,
8153        stream_id: 0_u8,
8154        camera_device_id: 0_u8,
8155    };
8156    #[cfg(feature = "arbitrary")]
8157    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8158        use arbitrary::{Arbitrary, Unstructured};
8159        let mut buf = [0u8; 1024];
8160        rng.fill_bytes(&mut buf);
8161        let mut unstructured = Unstructured::new(&buf);
8162        Self::arbitrary(&mut unstructured).unwrap_or_default()
8163    }
8164}
8165impl Default for CAMERA_THERMAL_RANGE_DATA {
8166    fn default() -> Self {
8167        Self::DEFAULT.clone()
8168    }
8169}
8170impl MessageData for CAMERA_THERMAL_RANGE_DATA {
8171    type Message = MavMessage;
8172    const ID: u32 = 277u32;
8173    const NAME: &'static str = "CAMERA_THERMAL_RANGE";
8174    const EXTRA_CRC: u8 = 62u8;
8175    const ENCODED_LEN: usize = 30usize;
8176    fn deser(
8177        _version: MavlinkVersion,
8178        __input: &[u8],
8179    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8180        let avail_len = __input.len();
8181        let mut payload_buf = [0; Self::ENCODED_LEN];
8182        let mut buf = if avail_len < Self::ENCODED_LEN {
8183            payload_buf[0..avail_len].copy_from_slice(__input);
8184            Bytes::new(&payload_buf)
8185        } else {
8186            Bytes::new(__input)
8187        };
8188        let mut __struct = Self::default();
8189        __struct.time_boot_ms = buf.get_u32_le();
8190        __struct.max = buf.get_f32_le();
8191        __struct.max_point_x = buf.get_f32_le();
8192        __struct.max_point_y = buf.get_f32_le();
8193        __struct.min = buf.get_f32_le();
8194        __struct.min_point_x = buf.get_f32_le();
8195        __struct.min_point_y = buf.get_f32_le();
8196        __struct.stream_id = buf.get_u8();
8197        __struct.camera_device_id = buf.get_u8();
8198        Ok(__struct)
8199    }
8200    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8201        let mut __tmp = BytesMut::new(bytes);
8202        #[allow(clippy::absurd_extreme_comparisons)]
8203        #[allow(unused_comparisons)]
8204        if __tmp.remaining() < Self::ENCODED_LEN {
8205            panic!(
8206                "buffer is too small (need {} bytes, but got {})",
8207                Self::ENCODED_LEN,
8208                __tmp.remaining(),
8209            )
8210        }
8211        __tmp.put_u32_le(self.time_boot_ms);
8212        __tmp.put_f32_le(self.max);
8213        __tmp.put_f32_le(self.max_point_x);
8214        __tmp.put_f32_le(self.max_point_y);
8215        __tmp.put_f32_le(self.min);
8216        __tmp.put_f32_le(self.min_point_x);
8217        __tmp.put_f32_le(self.min_point_y);
8218        __tmp.put_u8(self.stream_id);
8219        __tmp.put_u8(self.camera_device_id);
8220        if matches!(version, MavlinkVersion::V2) {
8221            let len = __tmp.len();
8222            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8223        } else {
8224            __tmp.len()
8225        }
8226    }
8227}
8228#[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
8229#[doc = ""]
8230#[doc = "ID: 276"]
8231#[derive(Debug, Clone, PartialEq)]
8232#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8233#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8234#[cfg_attr(feature = "ts", derive(TS))]
8235#[cfg_attr(feature = "ts", ts(export))]
8236pub struct CAMERA_TRACKING_GEO_STATUS_DATA {
8237    #[doc = "Latitude of tracked object"]
8238    pub lat: i32,
8239    #[doc = "Longitude of tracked object"]
8240    pub lon: i32,
8241    #[doc = "Altitude of tracked object(AMSL, WGS84)"]
8242    pub alt: f32,
8243    #[doc = "Horizontal accuracy. NAN if unknown"]
8244    pub h_acc: f32,
8245    #[doc = "Vertical accuracy. NAN if unknown"]
8246    pub v_acc: f32,
8247    #[doc = "North velocity of tracked object. NAN if unknown"]
8248    pub vel_n: f32,
8249    #[doc = "East velocity of tracked object. NAN if unknown"]
8250    pub vel_e: f32,
8251    #[doc = "Down velocity of tracked object. NAN if unknown"]
8252    pub vel_d: f32,
8253    #[doc = "Velocity accuracy. NAN if unknown"]
8254    pub vel_acc: f32,
8255    #[doc = "Distance between camera and tracked object. NAN if unknown"]
8256    pub dist: f32,
8257    #[doc = "Heading in radians, in NED. NAN if unknown"]
8258    pub hdg: f32,
8259    #[doc = "Accuracy of heading, in NED. NAN if unknown"]
8260    pub hdg_acc: f32,
8261    #[doc = "Current tracking status"]
8262    pub tracking_status: CameraTrackingStatusFlags,
8263    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
8264    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8265    pub camera_device_id: u8,
8266}
8267impl CAMERA_TRACKING_GEO_STATUS_DATA {
8268    pub const ENCODED_LEN: usize = 50usize;
8269    pub const DEFAULT: Self = Self {
8270        lat: 0_i32,
8271        lon: 0_i32,
8272        alt: 0.0_f32,
8273        h_acc: 0.0_f32,
8274        v_acc: 0.0_f32,
8275        vel_n: 0.0_f32,
8276        vel_e: 0.0_f32,
8277        vel_d: 0.0_f32,
8278        vel_acc: 0.0_f32,
8279        dist: 0.0_f32,
8280        hdg: 0.0_f32,
8281        hdg_acc: 0.0_f32,
8282        tracking_status: CameraTrackingStatusFlags::DEFAULT,
8283        camera_device_id: 0_u8,
8284    };
8285    #[cfg(feature = "arbitrary")]
8286    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8287        use arbitrary::{Arbitrary, Unstructured};
8288        let mut buf = [0u8; 1024];
8289        rng.fill_bytes(&mut buf);
8290        let mut unstructured = Unstructured::new(&buf);
8291        Self::arbitrary(&mut unstructured).unwrap_or_default()
8292    }
8293}
8294impl Default for CAMERA_TRACKING_GEO_STATUS_DATA {
8295    fn default() -> Self {
8296        Self::DEFAULT.clone()
8297    }
8298}
8299impl MessageData for CAMERA_TRACKING_GEO_STATUS_DATA {
8300    type Message = MavMessage;
8301    const ID: u32 = 276u32;
8302    const NAME: &'static str = "CAMERA_TRACKING_GEO_STATUS";
8303    const EXTRA_CRC: u8 = 18u8;
8304    const ENCODED_LEN: usize = 50usize;
8305    fn deser(
8306        _version: MavlinkVersion,
8307        __input: &[u8],
8308    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8309        let avail_len = __input.len();
8310        let mut payload_buf = [0; Self::ENCODED_LEN];
8311        let mut buf = if avail_len < Self::ENCODED_LEN {
8312            payload_buf[0..avail_len].copy_from_slice(__input);
8313            Bytes::new(&payload_buf)
8314        } else {
8315            Bytes::new(__input)
8316        };
8317        let mut __struct = Self::default();
8318        __struct.lat = buf.get_i32_le();
8319        __struct.lon = buf.get_i32_le();
8320        __struct.alt = buf.get_f32_le();
8321        __struct.h_acc = buf.get_f32_le();
8322        __struct.v_acc = buf.get_f32_le();
8323        __struct.vel_n = buf.get_f32_le();
8324        __struct.vel_e = buf.get_f32_le();
8325        __struct.vel_d = buf.get_f32_le();
8326        __struct.vel_acc = buf.get_f32_le();
8327        __struct.dist = buf.get_f32_le();
8328        __struct.hdg = buf.get_f32_le();
8329        __struct.hdg_acc = buf.get_f32_le();
8330        let tmp = buf.get_u8();
8331        __struct.tracking_status =
8332            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8333                enum_type: "CameraTrackingStatusFlags",
8334                value: tmp as u32,
8335            })?;
8336        __struct.camera_device_id = buf.get_u8();
8337        Ok(__struct)
8338    }
8339    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8340        let mut __tmp = BytesMut::new(bytes);
8341        #[allow(clippy::absurd_extreme_comparisons)]
8342        #[allow(unused_comparisons)]
8343        if __tmp.remaining() < Self::ENCODED_LEN {
8344            panic!(
8345                "buffer is too small (need {} bytes, but got {})",
8346                Self::ENCODED_LEN,
8347                __tmp.remaining(),
8348            )
8349        }
8350        __tmp.put_i32_le(self.lat);
8351        __tmp.put_i32_le(self.lon);
8352        __tmp.put_f32_le(self.alt);
8353        __tmp.put_f32_le(self.h_acc);
8354        __tmp.put_f32_le(self.v_acc);
8355        __tmp.put_f32_le(self.vel_n);
8356        __tmp.put_f32_le(self.vel_e);
8357        __tmp.put_f32_le(self.vel_d);
8358        __tmp.put_f32_le(self.vel_acc);
8359        __tmp.put_f32_le(self.dist);
8360        __tmp.put_f32_le(self.hdg);
8361        __tmp.put_f32_le(self.hdg_acc);
8362        __tmp.put_u8(self.tracking_status as u8);
8363        if matches!(version, MavlinkVersion::V2) {
8364            __tmp.put_u8(self.camera_device_id);
8365            let len = __tmp.len();
8366            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8367        } else {
8368            __tmp.len()
8369        }
8370    }
8371}
8372#[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
8373#[doc = ""]
8374#[doc = "ID: 275"]
8375#[derive(Debug, Clone, PartialEq)]
8376#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8377#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8378#[cfg_attr(feature = "ts", derive(TS))]
8379#[cfg_attr(feature = "ts", ts(export))]
8380pub struct CAMERA_TRACKING_IMAGE_STATUS_DATA {
8381    #[doc = "Current tracked point x value if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
8382    pub point_x: f32,
8383    #[doc = "Current tracked point y value if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
8384    pub point_y: f32,
8385    #[doc = "Current tracked radius if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is image left, 1 is image right), NAN if unknown"]
8386    pub radius: f32,
8387    #[doc = "Current tracked rectangle top x value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
8388    pub rec_top_x: f32,
8389    #[doc = "Current tracked rectangle top y value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
8390    pub rec_top_y: f32,
8391    #[doc = "Current tracked rectangle bottom x value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
8392    pub rec_bottom_x: f32,
8393    #[doc = "Current tracked rectangle bottom y value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
8394    pub rec_bottom_y: f32,
8395    #[doc = "Current tracking status"]
8396    pub tracking_status: CameraTrackingStatusFlags,
8397    #[doc = "Current tracking mode"]
8398    pub tracking_mode: CameraTrackingMode,
8399    #[doc = "Defines location of target data"]
8400    pub target_data: CameraTrackingTargetData,
8401    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
8402    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8403    pub camera_device_id: u8,
8404}
8405impl CAMERA_TRACKING_IMAGE_STATUS_DATA {
8406    pub const ENCODED_LEN: usize = 32usize;
8407    pub const DEFAULT: Self = Self {
8408        point_x: 0.0_f32,
8409        point_y: 0.0_f32,
8410        radius: 0.0_f32,
8411        rec_top_x: 0.0_f32,
8412        rec_top_y: 0.0_f32,
8413        rec_bottom_x: 0.0_f32,
8414        rec_bottom_y: 0.0_f32,
8415        tracking_status: CameraTrackingStatusFlags::DEFAULT,
8416        tracking_mode: CameraTrackingMode::DEFAULT,
8417        target_data: CameraTrackingTargetData::DEFAULT,
8418        camera_device_id: 0_u8,
8419    };
8420    #[cfg(feature = "arbitrary")]
8421    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8422        use arbitrary::{Arbitrary, Unstructured};
8423        let mut buf = [0u8; 1024];
8424        rng.fill_bytes(&mut buf);
8425        let mut unstructured = Unstructured::new(&buf);
8426        Self::arbitrary(&mut unstructured).unwrap_or_default()
8427    }
8428}
8429impl Default for CAMERA_TRACKING_IMAGE_STATUS_DATA {
8430    fn default() -> Self {
8431        Self::DEFAULT.clone()
8432    }
8433}
8434impl MessageData for CAMERA_TRACKING_IMAGE_STATUS_DATA {
8435    type Message = MavMessage;
8436    const ID: u32 = 275u32;
8437    const NAME: &'static str = "CAMERA_TRACKING_IMAGE_STATUS";
8438    const EXTRA_CRC: u8 = 126u8;
8439    const ENCODED_LEN: usize = 32usize;
8440    fn deser(
8441        _version: MavlinkVersion,
8442        __input: &[u8],
8443    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8444        let avail_len = __input.len();
8445        let mut payload_buf = [0; Self::ENCODED_LEN];
8446        let mut buf = if avail_len < Self::ENCODED_LEN {
8447            payload_buf[0..avail_len].copy_from_slice(__input);
8448            Bytes::new(&payload_buf)
8449        } else {
8450            Bytes::new(__input)
8451        };
8452        let mut __struct = Self::default();
8453        __struct.point_x = buf.get_f32_le();
8454        __struct.point_y = buf.get_f32_le();
8455        __struct.radius = buf.get_f32_le();
8456        __struct.rec_top_x = buf.get_f32_le();
8457        __struct.rec_top_y = buf.get_f32_le();
8458        __struct.rec_bottom_x = buf.get_f32_le();
8459        __struct.rec_bottom_y = buf.get_f32_le();
8460        let tmp = buf.get_u8();
8461        __struct.tracking_status =
8462            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8463                enum_type: "CameraTrackingStatusFlags",
8464                value: tmp as u32,
8465            })?;
8466        let tmp = buf.get_u8();
8467        __struct.tracking_mode =
8468            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8469                enum_type: "CameraTrackingMode",
8470                value: tmp as u32,
8471            })?;
8472        let tmp = buf.get_u8();
8473        __struct.target_data =
8474            CameraTrackingTargetData::from_bits(tmp & CameraTrackingTargetData::all().bits())
8475                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
8476                    flag_type: "CameraTrackingTargetData",
8477                    value: tmp as u32,
8478                })?;
8479        __struct.camera_device_id = buf.get_u8();
8480        Ok(__struct)
8481    }
8482    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8483        let mut __tmp = BytesMut::new(bytes);
8484        #[allow(clippy::absurd_extreme_comparisons)]
8485        #[allow(unused_comparisons)]
8486        if __tmp.remaining() < Self::ENCODED_LEN {
8487            panic!(
8488                "buffer is too small (need {} bytes, but got {})",
8489                Self::ENCODED_LEN,
8490                __tmp.remaining(),
8491            )
8492        }
8493        __tmp.put_f32_le(self.point_x);
8494        __tmp.put_f32_le(self.point_y);
8495        __tmp.put_f32_le(self.radius);
8496        __tmp.put_f32_le(self.rec_top_x);
8497        __tmp.put_f32_le(self.rec_top_y);
8498        __tmp.put_f32_le(self.rec_bottom_x);
8499        __tmp.put_f32_le(self.rec_bottom_y);
8500        __tmp.put_u8(self.tracking_status as u8);
8501        __tmp.put_u8(self.tracking_mode as u8);
8502        __tmp.put_u8(self.target_data.bits());
8503        if matches!(version, MavlinkVersion::V2) {
8504            __tmp.put_u8(self.camera_device_id);
8505            let len = __tmp.len();
8506            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8507        } else {
8508            __tmp.len()
8509        }
8510    }
8511}
8512#[doc = "Camera-IMU triggering and synchronisation message."]
8513#[doc = ""]
8514#[doc = "ID: 112"]
8515#[derive(Debug, Clone, PartialEq)]
8516#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8517#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8518#[cfg_attr(feature = "ts", derive(TS))]
8519#[cfg_attr(feature = "ts", ts(export))]
8520pub struct CAMERA_TRIGGER_DATA {
8521    #[doc = "Timestamp for image frame (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
8522    pub time_usec: u64,
8523    #[doc = "Image frame sequence"]
8524    pub seq: u32,
8525}
8526impl CAMERA_TRIGGER_DATA {
8527    pub const ENCODED_LEN: usize = 12usize;
8528    pub const DEFAULT: Self = Self {
8529        time_usec: 0_u64,
8530        seq: 0_u32,
8531    };
8532    #[cfg(feature = "arbitrary")]
8533    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8534        use arbitrary::{Arbitrary, Unstructured};
8535        let mut buf = [0u8; 1024];
8536        rng.fill_bytes(&mut buf);
8537        let mut unstructured = Unstructured::new(&buf);
8538        Self::arbitrary(&mut unstructured).unwrap_or_default()
8539    }
8540}
8541impl Default for CAMERA_TRIGGER_DATA {
8542    fn default() -> Self {
8543        Self::DEFAULT.clone()
8544    }
8545}
8546impl MessageData for CAMERA_TRIGGER_DATA {
8547    type Message = MavMessage;
8548    const ID: u32 = 112u32;
8549    const NAME: &'static str = "CAMERA_TRIGGER";
8550    const EXTRA_CRC: u8 = 174u8;
8551    const ENCODED_LEN: usize = 12usize;
8552    fn deser(
8553        _version: MavlinkVersion,
8554        __input: &[u8],
8555    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8556        let avail_len = __input.len();
8557        let mut payload_buf = [0; Self::ENCODED_LEN];
8558        let mut buf = if avail_len < Self::ENCODED_LEN {
8559            payload_buf[0..avail_len].copy_from_slice(__input);
8560            Bytes::new(&payload_buf)
8561        } else {
8562            Bytes::new(__input)
8563        };
8564        let mut __struct = Self::default();
8565        __struct.time_usec = buf.get_u64_le();
8566        __struct.seq = buf.get_u32_le();
8567        Ok(__struct)
8568    }
8569    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8570        let mut __tmp = BytesMut::new(bytes);
8571        #[allow(clippy::absurd_extreme_comparisons)]
8572        #[allow(unused_comparisons)]
8573        if __tmp.remaining() < Self::ENCODED_LEN {
8574            panic!(
8575                "buffer is too small (need {} bytes, but got {})",
8576                Self::ENCODED_LEN,
8577                __tmp.remaining(),
8578            )
8579        }
8580        __tmp.put_u64_le(self.time_usec);
8581        __tmp.put_u32_le(self.seq);
8582        if matches!(version, MavlinkVersion::V2) {
8583            let len = __tmp.len();
8584            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8585        } else {
8586            __tmp.len()
8587        }
8588    }
8589}
8590#[doc = "A forwarded CANFD frame as requested by MAV_CMD_CAN_FORWARD. These are separated from CAN_FRAME as they need different handling (eg. TAO handling)."]
8591#[doc = ""]
8592#[doc = "ID: 387"]
8593#[derive(Debug, Clone, PartialEq)]
8594#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8595#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8596#[cfg_attr(feature = "ts", derive(TS))]
8597#[cfg_attr(feature = "ts", ts(export))]
8598pub struct CANFD_FRAME_DATA {
8599    #[doc = "Frame ID"]
8600    pub id: u32,
8601    #[doc = "System ID."]
8602    pub target_system: u8,
8603    #[doc = "Component ID."]
8604    pub target_component: u8,
8605    #[doc = "bus number"]
8606    pub bus: u8,
8607    #[doc = "Frame length"]
8608    pub len: u8,
8609    #[doc = "Frame data"]
8610    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8611    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8612    pub data: [u8; 64],
8613}
8614impl CANFD_FRAME_DATA {
8615    pub const ENCODED_LEN: usize = 72usize;
8616    pub const DEFAULT: Self = Self {
8617        id: 0_u32,
8618        target_system: 0_u8,
8619        target_component: 0_u8,
8620        bus: 0_u8,
8621        len: 0_u8,
8622        data: [0_u8; 64usize],
8623    };
8624    #[cfg(feature = "arbitrary")]
8625    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8626        use arbitrary::{Arbitrary, Unstructured};
8627        let mut buf = [0u8; 1024];
8628        rng.fill_bytes(&mut buf);
8629        let mut unstructured = Unstructured::new(&buf);
8630        Self::arbitrary(&mut unstructured).unwrap_or_default()
8631    }
8632}
8633impl Default for CANFD_FRAME_DATA {
8634    fn default() -> Self {
8635        Self::DEFAULT.clone()
8636    }
8637}
8638impl MessageData for CANFD_FRAME_DATA {
8639    type Message = MavMessage;
8640    const ID: u32 = 387u32;
8641    const NAME: &'static str = "CANFD_FRAME";
8642    const EXTRA_CRC: u8 = 4u8;
8643    const ENCODED_LEN: usize = 72usize;
8644    fn deser(
8645        _version: MavlinkVersion,
8646        __input: &[u8],
8647    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8648        let avail_len = __input.len();
8649        let mut payload_buf = [0; Self::ENCODED_LEN];
8650        let mut buf = if avail_len < Self::ENCODED_LEN {
8651            payload_buf[0..avail_len].copy_from_slice(__input);
8652            Bytes::new(&payload_buf)
8653        } else {
8654            Bytes::new(__input)
8655        };
8656        let mut __struct = Self::default();
8657        __struct.id = buf.get_u32_le();
8658        __struct.target_system = buf.get_u8();
8659        __struct.target_component = buf.get_u8();
8660        __struct.bus = buf.get_u8();
8661        __struct.len = buf.get_u8();
8662        for v in &mut __struct.data {
8663            let val = buf.get_u8();
8664            *v = val;
8665        }
8666        Ok(__struct)
8667    }
8668    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8669        let mut __tmp = BytesMut::new(bytes);
8670        #[allow(clippy::absurd_extreme_comparisons)]
8671        #[allow(unused_comparisons)]
8672        if __tmp.remaining() < Self::ENCODED_LEN {
8673            panic!(
8674                "buffer is too small (need {} bytes, but got {})",
8675                Self::ENCODED_LEN,
8676                __tmp.remaining(),
8677            )
8678        }
8679        __tmp.put_u32_le(self.id);
8680        __tmp.put_u8(self.target_system);
8681        __tmp.put_u8(self.target_component);
8682        __tmp.put_u8(self.bus);
8683        __tmp.put_u8(self.len);
8684        for val in &self.data {
8685            __tmp.put_u8(*val);
8686        }
8687        if matches!(version, MavlinkVersion::V2) {
8688            let len = __tmp.len();
8689            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8690        } else {
8691            __tmp.len()
8692        }
8693    }
8694}
8695#[doc = "Modify the filter of what CAN messages to forward over the mavlink. This can be used to make CAN forwarding work well on low bandwidth links. The filtering is applied on bits 8 to 24 of the CAN id (2nd and 3rd bytes) which corresponds to the DroneCAN message ID for DroneCAN. Filters with more than 16 IDs can be constructed by sending multiple CAN_FILTER_MODIFY messages."]
8696#[doc = ""]
8697#[doc = "ID: 388"]
8698#[derive(Debug, Clone, PartialEq)]
8699#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8700#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8701#[cfg_attr(feature = "ts", derive(TS))]
8702#[cfg_attr(feature = "ts", ts(export))]
8703pub struct CAN_FILTER_MODIFY_DATA {
8704    #[doc = "filter IDs, length num_ids"]
8705    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8706    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8707    pub ids: [u16; 16],
8708    #[doc = "System ID."]
8709    pub target_system: u8,
8710    #[doc = "Component ID."]
8711    pub target_component: u8,
8712    #[doc = "bus number"]
8713    pub bus: u8,
8714    #[doc = "what operation to perform on the filter list. See CAN_FILTER_OP enum."]
8715    pub operation: CanFilterOp,
8716    #[doc = "number of IDs in filter list"]
8717    pub num_ids: u8,
8718}
8719impl CAN_FILTER_MODIFY_DATA {
8720    pub const ENCODED_LEN: usize = 37usize;
8721    pub const DEFAULT: Self = Self {
8722        ids: [0_u16; 16usize],
8723        target_system: 0_u8,
8724        target_component: 0_u8,
8725        bus: 0_u8,
8726        operation: CanFilterOp::DEFAULT,
8727        num_ids: 0_u8,
8728    };
8729    #[cfg(feature = "arbitrary")]
8730    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8731        use arbitrary::{Arbitrary, Unstructured};
8732        let mut buf = [0u8; 1024];
8733        rng.fill_bytes(&mut buf);
8734        let mut unstructured = Unstructured::new(&buf);
8735        Self::arbitrary(&mut unstructured).unwrap_or_default()
8736    }
8737}
8738impl Default for CAN_FILTER_MODIFY_DATA {
8739    fn default() -> Self {
8740        Self::DEFAULT.clone()
8741    }
8742}
8743impl MessageData for CAN_FILTER_MODIFY_DATA {
8744    type Message = MavMessage;
8745    const ID: u32 = 388u32;
8746    const NAME: &'static str = "CAN_FILTER_MODIFY";
8747    const EXTRA_CRC: u8 = 8u8;
8748    const ENCODED_LEN: usize = 37usize;
8749    fn deser(
8750        _version: MavlinkVersion,
8751        __input: &[u8],
8752    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8753        let avail_len = __input.len();
8754        let mut payload_buf = [0; Self::ENCODED_LEN];
8755        let mut buf = if avail_len < Self::ENCODED_LEN {
8756            payload_buf[0..avail_len].copy_from_slice(__input);
8757            Bytes::new(&payload_buf)
8758        } else {
8759            Bytes::new(__input)
8760        };
8761        let mut __struct = Self::default();
8762        for v in &mut __struct.ids {
8763            let val = buf.get_u16_le();
8764            *v = val;
8765        }
8766        __struct.target_system = buf.get_u8();
8767        __struct.target_component = buf.get_u8();
8768        __struct.bus = buf.get_u8();
8769        let tmp = buf.get_u8();
8770        __struct.operation =
8771            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8772                enum_type: "CanFilterOp",
8773                value: tmp as u32,
8774            })?;
8775        __struct.num_ids = buf.get_u8();
8776        Ok(__struct)
8777    }
8778    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8779        let mut __tmp = BytesMut::new(bytes);
8780        #[allow(clippy::absurd_extreme_comparisons)]
8781        #[allow(unused_comparisons)]
8782        if __tmp.remaining() < Self::ENCODED_LEN {
8783            panic!(
8784                "buffer is too small (need {} bytes, but got {})",
8785                Self::ENCODED_LEN,
8786                __tmp.remaining(),
8787            )
8788        }
8789        for val in &self.ids {
8790            __tmp.put_u16_le(*val);
8791        }
8792        __tmp.put_u8(self.target_system);
8793        __tmp.put_u8(self.target_component);
8794        __tmp.put_u8(self.bus);
8795        __tmp.put_u8(self.operation as u8);
8796        __tmp.put_u8(self.num_ids);
8797        if matches!(version, MavlinkVersion::V2) {
8798            let len = __tmp.len();
8799            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8800        } else {
8801            __tmp.len()
8802        }
8803    }
8804}
8805#[doc = "A forwarded CAN frame as requested by MAV_CMD_CAN_FORWARD."]
8806#[doc = ""]
8807#[doc = "ID: 386"]
8808#[derive(Debug, Clone, PartialEq)]
8809#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8810#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8811#[cfg_attr(feature = "ts", derive(TS))]
8812#[cfg_attr(feature = "ts", ts(export))]
8813pub struct CAN_FRAME_DATA {
8814    #[doc = "Frame ID"]
8815    pub id: u32,
8816    #[doc = "System ID."]
8817    pub target_system: u8,
8818    #[doc = "Component ID."]
8819    pub target_component: u8,
8820    #[doc = "Bus number"]
8821    pub bus: u8,
8822    #[doc = "Frame length"]
8823    pub len: u8,
8824    #[doc = "Frame data"]
8825    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8826    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8827    pub data: [u8; 8],
8828}
8829impl CAN_FRAME_DATA {
8830    pub const ENCODED_LEN: usize = 16usize;
8831    pub const DEFAULT: Self = Self {
8832        id: 0_u32,
8833        target_system: 0_u8,
8834        target_component: 0_u8,
8835        bus: 0_u8,
8836        len: 0_u8,
8837        data: [0_u8; 8usize],
8838    };
8839    #[cfg(feature = "arbitrary")]
8840    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8841        use arbitrary::{Arbitrary, Unstructured};
8842        let mut buf = [0u8; 1024];
8843        rng.fill_bytes(&mut buf);
8844        let mut unstructured = Unstructured::new(&buf);
8845        Self::arbitrary(&mut unstructured).unwrap_or_default()
8846    }
8847}
8848impl Default for CAN_FRAME_DATA {
8849    fn default() -> Self {
8850        Self::DEFAULT.clone()
8851    }
8852}
8853impl MessageData for CAN_FRAME_DATA {
8854    type Message = MavMessage;
8855    const ID: u32 = 386u32;
8856    const NAME: &'static str = "CAN_FRAME";
8857    const EXTRA_CRC: u8 = 132u8;
8858    const ENCODED_LEN: usize = 16usize;
8859    fn deser(
8860        _version: MavlinkVersion,
8861        __input: &[u8],
8862    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8863        let avail_len = __input.len();
8864        let mut payload_buf = [0; Self::ENCODED_LEN];
8865        let mut buf = if avail_len < Self::ENCODED_LEN {
8866            payload_buf[0..avail_len].copy_from_slice(__input);
8867            Bytes::new(&payload_buf)
8868        } else {
8869            Bytes::new(__input)
8870        };
8871        let mut __struct = Self::default();
8872        __struct.id = buf.get_u32_le();
8873        __struct.target_system = buf.get_u8();
8874        __struct.target_component = buf.get_u8();
8875        __struct.bus = buf.get_u8();
8876        __struct.len = buf.get_u8();
8877        for v in &mut __struct.data {
8878            let val = buf.get_u8();
8879            *v = val;
8880        }
8881        Ok(__struct)
8882    }
8883    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8884        let mut __tmp = BytesMut::new(bytes);
8885        #[allow(clippy::absurd_extreme_comparisons)]
8886        #[allow(unused_comparisons)]
8887        if __tmp.remaining() < Self::ENCODED_LEN {
8888            panic!(
8889                "buffer is too small (need {} bytes, but got {})",
8890                Self::ENCODED_LEN,
8891                __tmp.remaining(),
8892            )
8893        }
8894        __tmp.put_u32_le(self.id);
8895        __tmp.put_u8(self.target_system);
8896        __tmp.put_u8(self.target_component);
8897        __tmp.put_u8(self.bus);
8898        __tmp.put_u8(self.len);
8899        for val in &self.data {
8900            __tmp.put_u8(*val);
8901        }
8902        if matches!(version, MavlinkVersion::V2) {
8903            let len = __tmp.len();
8904            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8905        } else {
8906            __tmp.len()
8907        }
8908    }
8909}
8910#[doc = "Configure cellular modems.         This message is re-emitted as an acknowledgement by the modem.         The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
8911#[doc = ""]
8912#[doc = "ID: 336"]
8913#[derive(Debug, Clone, PartialEq)]
8914#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8915#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8916#[cfg_attr(feature = "ts", derive(TS))]
8917#[cfg_attr(feature = "ts", ts(export))]
8918pub struct CELLULAR_CONFIG_DATA {
8919    #[doc = "Enable/disable LTE. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8920    pub enable_lte: u8,
8921    #[doc = "Enable/disable PIN on the SIM card. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8922    pub enable_pin: u8,
8923    #[doc = "PIN sent to the SIM card. Blank when PIN is disabled. Empty when message is sent back as a response."]
8924    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8925    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8926    pub pin: [u8; 16],
8927    #[doc = "New PIN when changing the PIN. Blank to leave it unchanged. Empty when message is sent back as a response."]
8928    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8929    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8930    pub new_pin: [u8; 16],
8931    #[doc = "Name of the cellular APN. Blank to leave it unchanged. Current APN when sent back as a response."]
8932    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8933    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8934    pub apn: [u8; 32],
8935    #[doc = "Required PUK code in case the user failed to authenticate 3 times with the PIN. Empty when message is sent back as a response."]
8936    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8937    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8938    pub puk: [u8; 16],
8939    #[doc = "Enable/disable roaming. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8940    pub roaming: u8,
8941    #[doc = "Message acceptance response (sent back to GS)."]
8942    pub response: CellularConfigResponse,
8943}
8944impl CELLULAR_CONFIG_DATA {
8945    pub const ENCODED_LEN: usize = 84usize;
8946    pub const DEFAULT: Self = Self {
8947        enable_lte: 0_u8,
8948        enable_pin: 0_u8,
8949        pin: [0_u8; 16usize],
8950        new_pin: [0_u8; 16usize],
8951        apn: [0_u8; 32usize],
8952        puk: [0_u8; 16usize],
8953        roaming: 0_u8,
8954        response: CellularConfigResponse::DEFAULT,
8955    };
8956    #[cfg(feature = "arbitrary")]
8957    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8958        use arbitrary::{Arbitrary, Unstructured};
8959        let mut buf = [0u8; 1024];
8960        rng.fill_bytes(&mut buf);
8961        let mut unstructured = Unstructured::new(&buf);
8962        Self::arbitrary(&mut unstructured).unwrap_or_default()
8963    }
8964}
8965impl Default for CELLULAR_CONFIG_DATA {
8966    fn default() -> Self {
8967        Self::DEFAULT.clone()
8968    }
8969}
8970impl MessageData for CELLULAR_CONFIG_DATA {
8971    type Message = MavMessage;
8972    const ID: u32 = 336u32;
8973    const NAME: &'static str = "CELLULAR_CONFIG";
8974    const EXTRA_CRC: u8 = 245u8;
8975    const ENCODED_LEN: usize = 84usize;
8976    fn deser(
8977        _version: MavlinkVersion,
8978        __input: &[u8],
8979    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8980        let avail_len = __input.len();
8981        let mut payload_buf = [0; Self::ENCODED_LEN];
8982        let mut buf = if avail_len < Self::ENCODED_LEN {
8983            payload_buf[0..avail_len].copy_from_slice(__input);
8984            Bytes::new(&payload_buf)
8985        } else {
8986            Bytes::new(__input)
8987        };
8988        let mut __struct = Self::default();
8989        __struct.enable_lte = buf.get_u8();
8990        __struct.enable_pin = buf.get_u8();
8991        for v in &mut __struct.pin {
8992            let val = buf.get_u8();
8993            *v = val;
8994        }
8995        for v in &mut __struct.new_pin {
8996            let val = buf.get_u8();
8997            *v = val;
8998        }
8999        for v in &mut __struct.apn {
9000            let val = buf.get_u8();
9001            *v = val;
9002        }
9003        for v in &mut __struct.puk {
9004            let val = buf.get_u8();
9005            *v = val;
9006        }
9007        __struct.roaming = buf.get_u8();
9008        let tmp = buf.get_u8();
9009        __struct.response =
9010            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9011                enum_type: "CellularConfigResponse",
9012                value: tmp as u32,
9013            })?;
9014        Ok(__struct)
9015    }
9016    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9017        let mut __tmp = BytesMut::new(bytes);
9018        #[allow(clippy::absurd_extreme_comparisons)]
9019        #[allow(unused_comparisons)]
9020        if __tmp.remaining() < Self::ENCODED_LEN {
9021            panic!(
9022                "buffer is too small (need {} bytes, but got {})",
9023                Self::ENCODED_LEN,
9024                __tmp.remaining(),
9025            )
9026        }
9027        __tmp.put_u8(self.enable_lte);
9028        __tmp.put_u8(self.enable_pin);
9029        for val in &self.pin {
9030            __tmp.put_u8(*val);
9031        }
9032        for val in &self.new_pin {
9033            __tmp.put_u8(*val);
9034        }
9035        for val in &self.apn {
9036            __tmp.put_u8(*val);
9037        }
9038        for val in &self.puk {
9039            __tmp.put_u8(*val);
9040        }
9041        __tmp.put_u8(self.roaming);
9042        __tmp.put_u8(self.response as u8);
9043        if matches!(version, MavlinkVersion::V2) {
9044            let len = __tmp.len();
9045            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9046        } else {
9047            __tmp.len()
9048        }
9049    }
9050}
9051#[doc = "Report current used cellular network status."]
9052#[doc = ""]
9053#[doc = "ID: 334"]
9054#[derive(Debug, Clone, PartialEq)]
9055#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9056#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9057#[cfg_attr(feature = "ts", derive(TS))]
9058#[cfg_attr(feature = "ts", ts(export))]
9059pub struct CELLULAR_STATUS_DATA {
9060    #[doc = "Mobile country code. If unknown, set to UINT16_MAX"]
9061    pub mcc: u16,
9062    #[doc = "Mobile network code. If unknown, set to UINT16_MAX"]
9063    pub mnc: u16,
9064    #[doc = "Location area code. If unknown, set to 0"]
9065    pub lac: u16,
9066    #[doc = "Cellular modem status"]
9067    pub status: CellularStatusFlag,
9068    #[doc = "Failure reason when status in in CELLULAR_STATUS_FLAG_FAILED"]
9069    pub failure_reason: CellularNetworkFailedReason,
9070    #[doc = "Cellular network radio type: gsm, cdma, lte..."]
9071    pub mavtype: CellularNetworkRadioType,
9072    #[doc = "Signal quality in percent. If unknown, set to UINT8_MAX"]
9073    pub quality: u8,
9074}
9075impl CELLULAR_STATUS_DATA {
9076    pub const ENCODED_LEN: usize = 10usize;
9077    pub const DEFAULT: Self = Self {
9078        mcc: 0_u16,
9079        mnc: 0_u16,
9080        lac: 0_u16,
9081        status: CellularStatusFlag::DEFAULT,
9082        failure_reason: CellularNetworkFailedReason::DEFAULT,
9083        mavtype: CellularNetworkRadioType::DEFAULT,
9084        quality: 0_u8,
9085    };
9086    #[cfg(feature = "arbitrary")]
9087    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9088        use arbitrary::{Arbitrary, Unstructured};
9089        let mut buf = [0u8; 1024];
9090        rng.fill_bytes(&mut buf);
9091        let mut unstructured = Unstructured::new(&buf);
9092        Self::arbitrary(&mut unstructured).unwrap_or_default()
9093    }
9094}
9095impl Default for CELLULAR_STATUS_DATA {
9096    fn default() -> Self {
9097        Self::DEFAULT.clone()
9098    }
9099}
9100impl MessageData for CELLULAR_STATUS_DATA {
9101    type Message = MavMessage;
9102    const ID: u32 = 334u32;
9103    const NAME: &'static str = "CELLULAR_STATUS";
9104    const EXTRA_CRC: u8 = 72u8;
9105    const ENCODED_LEN: usize = 10usize;
9106    fn deser(
9107        _version: MavlinkVersion,
9108        __input: &[u8],
9109    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9110        let avail_len = __input.len();
9111        let mut payload_buf = [0; Self::ENCODED_LEN];
9112        let mut buf = if avail_len < Self::ENCODED_LEN {
9113            payload_buf[0..avail_len].copy_from_slice(__input);
9114            Bytes::new(&payload_buf)
9115        } else {
9116            Bytes::new(__input)
9117        };
9118        let mut __struct = Self::default();
9119        __struct.mcc = buf.get_u16_le();
9120        __struct.mnc = buf.get_u16_le();
9121        __struct.lac = buf.get_u16_le();
9122        let tmp = buf.get_u8();
9123        __struct.status =
9124            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9125                enum_type: "CellularStatusFlag",
9126                value: tmp as u32,
9127            })?;
9128        let tmp = buf.get_u8();
9129        __struct.failure_reason =
9130            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9131                enum_type: "CellularNetworkFailedReason",
9132                value: tmp as u32,
9133            })?;
9134        let tmp = buf.get_u8();
9135        __struct.mavtype =
9136            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9137                enum_type: "CellularNetworkRadioType",
9138                value: tmp as u32,
9139            })?;
9140        __struct.quality = buf.get_u8();
9141        Ok(__struct)
9142    }
9143    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9144        let mut __tmp = BytesMut::new(bytes);
9145        #[allow(clippy::absurd_extreme_comparisons)]
9146        #[allow(unused_comparisons)]
9147        if __tmp.remaining() < Self::ENCODED_LEN {
9148            panic!(
9149                "buffer is too small (need {} bytes, but got {})",
9150                Self::ENCODED_LEN,
9151                __tmp.remaining(),
9152            )
9153        }
9154        __tmp.put_u16_le(self.mcc);
9155        __tmp.put_u16_le(self.mnc);
9156        __tmp.put_u16_le(self.lac);
9157        __tmp.put_u8(self.status as u8);
9158        __tmp.put_u8(self.failure_reason as u8);
9159        __tmp.put_u8(self.mavtype as u8);
9160        __tmp.put_u8(self.quality);
9161        if matches!(version, MavlinkVersion::V2) {
9162            let len = __tmp.len();
9163            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9164        } else {
9165            __tmp.len()
9166        }
9167    }
9168}
9169#[doc = "Request to control this MAV."]
9170#[doc = ""]
9171#[doc = "ID: 5"]
9172#[derive(Debug, Clone, PartialEq)]
9173#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9174#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9175#[cfg_attr(feature = "ts", derive(TS))]
9176#[cfg_attr(feature = "ts", ts(export))]
9177pub struct CHANGE_OPERATOR_CONTROL_DATA {
9178    #[doc = "System the GCS requests control for"]
9179    pub target_system: u8,
9180    #[doc = "0: request control of this MAV, 1: Release control of this MAV"]
9181    pub control_request: u8,
9182    #[doc = "0: key as plaintext, 1-255: future, different hashing/encryption variants. The GCS should in general use the safest mode possible initially and then gradually move down the encryption level if it gets a NACK message indicating an encryption mismatch."]
9183    pub version: u8,
9184    #[doc = "Password / Key, depending on version plaintext or encrypted. 25 or less characters, NULL terminated. The characters may involve A-Z, a-z, 0-9, and \"!?,.-\""]
9185    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9186    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
9187    pub passkey: [u8; 25],
9188}
9189impl CHANGE_OPERATOR_CONTROL_DATA {
9190    pub const ENCODED_LEN: usize = 28usize;
9191    pub const DEFAULT: Self = Self {
9192        target_system: 0_u8,
9193        control_request: 0_u8,
9194        version: 0_u8,
9195        passkey: [0_u8; 25usize],
9196    };
9197    #[cfg(feature = "arbitrary")]
9198    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9199        use arbitrary::{Arbitrary, Unstructured};
9200        let mut buf = [0u8; 1024];
9201        rng.fill_bytes(&mut buf);
9202        let mut unstructured = Unstructured::new(&buf);
9203        Self::arbitrary(&mut unstructured).unwrap_or_default()
9204    }
9205}
9206impl Default for CHANGE_OPERATOR_CONTROL_DATA {
9207    fn default() -> Self {
9208        Self::DEFAULT.clone()
9209    }
9210}
9211impl MessageData for CHANGE_OPERATOR_CONTROL_DATA {
9212    type Message = MavMessage;
9213    const ID: u32 = 5u32;
9214    const NAME: &'static str = "CHANGE_OPERATOR_CONTROL";
9215    const EXTRA_CRC: u8 = 217u8;
9216    const ENCODED_LEN: usize = 28usize;
9217    fn deser(
9218        _version: MavlinkVersion,
9219        __input: &[u8],
9220    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9221        let avail_len = __input.len();
9222        let mut payload_buf = [0; Self::ENCODED_LEN];
9223        let mut buf = if avail_len < Self::ENCODED_LEN {
9224            payload_buf[0..avail_len].copy_from_slice(__input);
9225            Bytes::new(&payload_buf)
9226        } else {
9227            Bytes::new(__input)
9228        };
9229        let mut __struct = Self::default();
9230        __struct.target_system = buf.get_u8();
9231        __struct.control_request = buf.get_u8();
9232        __struct.version = buf.get_u8();
9233        for v in &mut __struct.passkey {
9234            let val = buf.get_u8();
9235            *v = val;
9236        }
9237        Ok(__struct)
9238    }
9239    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9240        let mut __tmp = BytesMut::new(bytes);
9241        #[allow(clippy::absurd_extreme_comparisons)]
9242        #[allow(unused_comparisons)]
9243        if __tmp.remaining() < Self::ENCODED_LEN {
9244            panic!(
9245                "buffer is too small (need {} bytes, but got {})",
9246                Self::ENCODED_LEN,
9247                __tmp.remaining(),
9248            )
9249        }
9250        __tmp.put_u8(self.target_system);
9251        __tmp.put_u8(self.control_request);
9252        __tmp.put_u8(self.version);
9253        for val in &self.passkey {
9254            __tmp.put_u8(*val);
9255        }
9256        if matches!(version, MavlinkVersion::V2) {
9257            let len = __tmp.len();
9258            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9259        } else {
9260            __tmp.len()
9261        }
9262    }
9263}
9264#[doc = "Accept / deny control of this MAV."]
9265#[doc = ""]
9266#[doc = "ID: 6"]
9267#[derive(Debug, Clone, PartialEq)]
9268#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9269#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9270#[cfg_attr(feature = "ts", derive(TS))]
9271#[cfg_attr(feature = "ts", ts(export))]
9272pub struct CHANGE_OPERATOR_CONTROL_ACK_DATA {
9273    #[doc = "ID of the GCS this message"]
9274    pub gcs_system_id: u8,
9275    #[doc = "0: request control of this MAV, 1: Release control of this MAV"]
9276    pub control_request: u8,
9277    #[doc = "0: ACK, 1: NACK: Wrong passkey, 2: NACK: Unsupported passkey encryption method, 3: NACK: Already under control"]
9278    pub ack: u8,
9279}
9280impl CHANGE_OPERATOR_CONTROL_ACK_DATA {
9281    pub const ENCODED_LEN: usize = 3usize;
9282    pub const DEFAULT: Self = Self {
9283        gcs_system_id: 0_u8,
9284        control_request: 0_u8,
9285        ack: 0_u8,
9286    };
9287    #[cfg(feature = "arbitrary")]
9288    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9289        use arbitrary::{Arbitrary, Unstructured};
9290        let mut buf = [0u8; 1024];
9291        rng.fill_bytes(&mut buf);
9292        let mut unstructured = Unstructured::new(&buf);
9293        Self::arbitrary(&mut unstructured).unwrap_or_default()
9294    }
9295}
9296impl Default for CHANGE_OPERATOR_CONTROL_ACK_DATA {
9297    fn default() -> Self {
9298        Self::DEFAULT.clone()
9299    }
9300}
9301impl MessageData for CHANGE_OPERATOR_CONTROL_ACK_DATA {
9302    type Message = MavMessage;
9303    const ID: u32 = 6u32;
9304    const NAME: &'static str = "CHANGE_OPERATOR_CONTROL_ACK";
9305    const EXTRA_CRC: u8 = 104u8;
9306    const ENCODED_LEN: usize = 3usize;
9307    fn deser(
9308        _version: MavlinkVersion,
9309        __input: &[u8],
9310    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9311        let avail_len = __input.len();
9312        let mut payload_buf = [0; Self::ENCODED_LEN];
9313        let mut buf = if avail_len < Self::ENCODED_LEN {
9314            payload_buf[0..avail_len].copy_from_slice(__input);
9315            Bytes::new(&payload_buf)
9316        } else {
9317            Bytes::new(__input)
9318        };
9319        let mut __struct = Self::default();
9320        __struct.gcs_system_id = buf.get_u8();
9321        __struct.control_request = buf.get_u8();
9322        __struct.ack = buf.get_u8();
9323        Ok(__struct)
9324    }
9325    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9326        let mut __tmp = BytesMut::new(bytes);
9327        #[allow(clippy::absurd_extreme_comparisons)]
9328        #[allow(unused_comparisons)]
9329        if __tmp.remaining() < Self::ENCODED_LEN {
9330            panic!(
9331                "buffer is too small (need {} bytes, but got {})",
9332                Self::ENCODED_LEN,
9333                __tmp.remaining(),
9334            )
9335        }
9336        __tmp.put_u8(self.gcs_system_id);
9337        __tmp.put_u8(self.control_request);
9338        __tmp.put_u8(self.ack);
9339        if matches!(version, MavlinkVersion::V2) {
9340            let len = __tmp.len();
9341            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9342        } else {
9343            __tmp.len()
9344        }
9345    }
9346}
9347#[doc = "Information about a potential collision."]
9348#[doc = ""]
9349#[doc = "ID: 247"]
9350#[derive(Debug, Clone, PartialEq)]
9351#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9352#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9353#[cfg_attr(feature = "ts", derive(TS))]
9354#[cfg_attr(feature = "ts", ts(export))]
9355pub struct COLLISION_DATA {
9356    #[doc = "Unique identifier, domain based on src field"]
9357    pub id: u32,
9358    #[doc = "Estimated time until collision occurs"]
9359    pub time_to_minimum_delta: f32,
9360    #[doc = "Closest vertical distance between vehicle and object"]
9361    pub altitude_minimum_delta: f32,
9362    #[doc = "Closest horizontal distance between vehicle and object"]
9363    pub horizontal_minimum_delta: f32,
9364    #[doc = "Collision data source"]
9365    pub src: MavCollisionSrc,
9366    #[doc = "Action that is being taken to avoid this collision"]
9367    pub action: MavCollisionAction,
9368    #[doc = "How concerned the aircraft is about this collision"]
9369    pub threat_level: MavCollisionThreatLevel,
9370}
9371impl COLLISION_DATA {
9372    pub const ENCODED_LEN: usize = 19usize;
9373    pub const DEFAULT: Self = Self {
9374        id: 0_u32,
9375        time_to_minimum_delta: 0.0_f32,
9376        altitude_minimum_delta: 0.0_f32,
9377        horizontal_minimum_delta: 0.0_f32,
9378        src: MavCollisionSrc::DEFAULT,
9379        action: MavCollisionAction::DEFAULT,
9380        threat_level: MavCollisionThreatLevel::DEFAULT,
9381    };
9382    #[cfg(feature = "arbitrary")]
9383    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9384        use arbitrary::{Arbitrary, Unstructured};
9385        let mut buf = [0u8; 1024];
9386        rng.fill_bytes(&mut buf);
9387        let mut unstructured = Unstructured::new(&buf);
9388        Self::arbitrary(&mut unstructured).unwrap_or_default()
9389    }
9390}
9391impl Default for COLLISION_DATA {
9392    fn default() -> Self {
9393        Self::DEFAULT.clone()
9394    }
9395}
9396impl MessageData for COLLISION_DATA {
9397    type Message = MavMessage;
9398    const ID: u32 = 247u32;
9399    const NAME: &'static str = "COLLISION";
9400    const EXTRA_CRC: u8 = 81u8;
9401    const ENCODED_LEN: usize = 19usize;
9402    fn deser(
9403        _version: MavlinkVersion,
9404        __input: &[u8],
9405    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9406        let avail_len = __input.len();
9407        let mut payload_buf = [0; Self::ENCODED_LEN];
9408        let mut buf = if avail_len < Self::ENCODED_LEN {
9409            payload_buf[0..avail_len].copy_from_slice(__input);
9410            Bytes::new(&payload_buf)
9411        } else {
9412            Bytes::new(__input)
9413        };
9414        let mut __struct = Self::default();
9415        __struct.id = buf.get_u32_le();
9416        __struct.time_to_minimum_delta = buf.get_f32_le();
9417        __struct.altitude_minimum_delta = buf.get_f32_le();
9418        __struct.horizontal_minimum_delta = buf.get_f32_le();
9419        let tmp = buf.get_u8();
9420        __struct.src =
9421            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9422                enum_type: "MavCollisionSrc",
9423                value: tmp as u32,
9424            })?;
9425        let tmp = buf.get_u8();
9426        __struct.action =
9427            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9428                enum_type: "MavCollisionAction",
9429                value: tmp as u32,
9430            })?;
9431        let tmp = buf.get_u8();
9432        __struct.threat_level =
9433            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9434                enum_type: "MavCollisionThreatLevel",
9435                value: tmp as u32,
9436            })?;
9437        Ok(__struct)
9438    }
9439    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9440        let mut __tmp = BytesMut::new(bytes);
9441        #[allow(clippy::absurd_extreme_comparisons)]
9442        #[allow(unused_comparisons)]
9443        if __tmp.remaining() < Self::ENCODED_LEN {
9444            panic!(
9445                "buffer is too small (need {} bytes, but got {})",
9446                Self::ENCODED_LEN,
9447                __tmp.remaining(),
9448            )
9449        }
9450        __tmp.put_u32_le(self.id);
9451        __tmp.put_f32_le(self.time_to_minimum_delta);
9452        __tmp.put_f32_le(self.altitude_minimum_delta);
9453        __tmp.put_f32_le(self.horizontal_minimum_delta);
9454        __tmp.put_u8(self.src as u8);
9455        __tmp.put_u8(self.action as u8);
9456        __tmp.put_u8(self.threat_level as u8);
9457        if matches!(version, MavlinkVersion::V2) {
9458            let len = __tmp.len();
9459            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9460        } else {
9461            __tmp.len()
9462        }
9463    }
9464}
9465#[doc = "Report status of a command. Includes feedback whether the command was executed. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9466#[doc = ""]
9467#[doc = "ID: 77"]
9468#[derive(Debug, Clone, PartialEq)]
9469#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9470#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9471#[cfg_attr(feature = "ts", derive(TS))]
9472#[cfg_attr(feature = "ts", ts(export))]
9473pub struct COMMAND_ACK_DATA {
9474    #[doc = "Command ID (of acknowledged command)."]
9475    pub command: MavCmd,
9476    #[doc = "Result of command."]
9477    pub result: MavResult,
9478    #[doc = "The progress percentage when result is MAV_RESULT_IN_PROGRESS. Values: [0-100], or UINT8_MAX if the progress is unknown."]
9479    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9480    pub progress: u8,
9481    #[doc = "Additional result information. Can be set with a command-specific enum containing command-specific error reasons for why the command might be denied. If used, the associated enum must be documented in the corresponding MAV_CMD (this enum should have a 0 value to indicate \"unused\" or \"unknown\")."]
9482    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9483    pub result_param2: i32,
9484    #[doc = "System ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement."]
9485    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9486    pub target_system: u8,
9487    #[doc = "Component ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement."]
9488    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9489    pub target_component: u8,
9490}
9491impl COMMAND_ACK_DATA {
9492    pub const ENCODED_LEN: usize = 10usize;
9493    pub const DEFAULT: Self = Self {
9494        command: MavCmd::DEFAULT,
9495        result: MavResult::DEFAULT,
9496        progress: 0_u8,
9497        result_param2: 0_i32,
9498        target_system: 0_u8,
9499        target_component: 0_u8,
9500    };
9501    #[cfg(feature = "arbitrary")]
9502    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9503        use arbitrary::{Arbitrary, Unstructured};
9504        let mut buf = [0u8; 1024];
9505        rng.fill_bytes(&mut buf);
9506        let mut unstructured = Unstructured::new(&buf);
9507        Self::arbitrary(&mut unstructured).unwrap_or_default()
9508    }
9509}
9510impl Default for COMMAND_ACK_DATA {
9511    fn default() -> Self {
9512        Self::DEFAULT.clone()
9513    }
9514}
9515impl MessageData for COMMAND_ACK_DATA {
9516    type Message = MavMessage;
9517    const ID: u32 = 77u32;
9518    const NAME: &'static str = "COMMAND_ACK";
9519    const EXTRA_CRC: u8 = 143u8;
9520    const ENCODED_LEN: usize = 10usize;
9521    fn deser(
9522        _version: MavlinkVersion,
9523        __input: &[u8],
9524    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9525        let avail_len = __input.len();
9526        let mut payload_buf = [0; Self::ENCODED_LEN];
9527        let mut buf = if avail_len < Self::ENCODED_LEN {
9528            payload_buf[0..avail_len].copy_from_slice(__input);
9529            Bytes::new(&payload_buf)
9530        } else {
9531            Bytes::new(__input)
9532        };
9533        let mut __struct = Self::default();
9534        let tmp = buf.get_u16_le();
9535        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9536            ::mavlink_core::error::ParserError::InvalidEnum {
9537                enum_type: "MavCmd",
9538                value: tmp as u32,
9539            },
9540        )?;
9541        let tmp = buf.get_u8();
9542        __struct.result =
9543            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9544                enum_type: "MavResult",
9545                value: tmp as u32,
9546            })?;
9547        __struct.progress = buf.get_u8();
9548        __struct.result_param2 = buf.get_i32_le();
9549        __struct.target_system = buf.get_u8();
9550        __struct.target_component = buf.get_u8();
9551        Ok(__struct)
9552    }
9553    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9554        let mut __tmp = BytesMut::new(bytes);
9555        #[allow(clippy::absurd_extreme_comparisons)]
9556        #[allow(unused_comparisons)]
9557        if __tmp.remaining() < Self::ENCODED_LEN {
9558            panic!(
9559                "buffer is too small (need {} bytes, but got {})",
9560                Self::ENCODED_LEN,
9561                __tmp.remaining(),
9562            )
9563        }
9564        __tmp.put_u16_le(self.command as u16);
9565        __tmp.put_u8(self.result as u8);
9566        if matches!(version, MavlinkVersion::V2) {
9567            __tmp.put_u8(self.progress);
9568            __tmp.put_i32_le(self.result_param2);
9569            __tmp.put_u8(self.target_system);
9570            __tmp.put_u8(self.target_component);
9571            let len = __tmp.len();
9572            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9573        } else {
9574            __tmp.len()
9575        }
9576    }
9577}
9578#[doc = "Cancel a long running command. The target system should respond with a COMMAND_ACK to the original command with result=MAV_RESULT_CANCELLED if the long running process was cancelled. If it has already completed, the cancel action can be ignored. The cancel action can be retried until some sort of acknowledgement to the original command has been received. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9579#[doc = ""]
9580#[doc = "ID: 80"]
9581#[derive(Debug, Clone, PartialEq)]
9582#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9583#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9584#[cfg_attr(feature = "ts", derive(TS))]
9585#[cfg_attr(feature = "ts", ts(export))]
9586pub struct COMMAND_CANCEL_DATA {
9587    #[doc = "Command ID (of command to cancel)."]
9588    pub command: MavCmd,
9589    #[doc = "System executing long running command. Should not be broadcast (0)."]
9590    pub target_system: u8,
9591    #[doc = "Component executing long running command."]
9592    pub target_component: u8,
9593}
9594impl COMMAND_CANCEL_DATA {
9595    pub const ENCODED_LEN: usize = 4usize;
9596    pub const DEFAULT: Self = Self {
9597        command: MavCmd::DEFAULT,
9598        target_system: 0_u8,
9599        target_component: 0_u8,
9600    };
9601    #[cfg(feature = "arbitrary")]
9602    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9603        use arbitrary::{Arbitrary, Unstructured};
9604        let mut buf = [0u8; 1024];
9605        rng.fill_bytes(&mut buf);
9606        let mut unstructured = Unstructured::new(&buf);
9607        Self::arbitrary(&mut unstructured).unwrap_or_default()
9608    }
9609}
9610impl Default for COMMAND_CANCEL_DATA {
9611    fn default() -> Self {
9612        Self::DEFAULT.clone()
9613    }
9614}
9615impl MessageData for COMMAND_CANCEL_DATA {
9616    type Message = MavMessage;
9617    const ID: u32 = 80u32;
9618    const NAME: &'static str = "COMMAND_CANCEL";
9619    const EXTRA_CRC: u8 = 14u8;
9620    const ENCODED_LEN: usize = 4usize;
9621    fn deser(
9622        _version: MavlinkVersion,
9623        __input: &[u8],
9624    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9625        let avail_len = __input.len();
9626        let mut payload_buf = [0; Self::ENCODED_LEN];
9627        let mut buf = if avail_len < Self::ENCODED_LEN {
9628            payload_buf[0..avail_len].copy_from_slice(__input);
9629            Bytes::new(&payload_buf)
9630        } else {
9631            Bytes::new(__input)
9632        };
9633        let mut __struct = Self::default();
9634        let tmp = buf.get_u16_le();
9635        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9636            ::mavlink_core::error::ParserError::InvalidEnum {
9637                enum_type: "MavCmd",
9638                value: tmp as u32,
9639            },
9640        )?;
9641        __struct.target_system = buf.get_u8();
9642        __struct.target_component = buf.get_u8();
9643        Ok(__struct)
9644    }
9645    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9646        let mut __tmp = BytesMut::new(bytes);
9647        #[allow(clippy::absurd_extreme_comparisons)]
9648        #[allow(unused_comparisons)]
9649        if __tmp.remaining() < Self::ENCODED_LEN {
9650            panic!(
9651                "buffer is too small (need {} bytes, but got {})",
9652                Self::ENCODED_LEN,
9653                __tmp.remaining(),
9654            )
9655        }
9656        __tmp.put_u16_le(self.command as u16);
9657        __tmp.put_u8(self.target_system);
9658        __tmp.put_u8(self.target_component);
9659        if matches!(version, MavlinkVersion::V2) {
9660            let len = __tmp.len();
9661            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9662        } else {
9663            __tmp.len()
9664        }
9665    }
9666}
9667#[doc = "Send a command with up to seven parameters to the MAV, where params 5 and 6 are integers and the other values are floats. This is preferred over COMMAND_LONG as it allows the MAV_FRAME to be specified for interpreting positional information, such as altitude. COMMAND_INT is also preferred when sending latitude and longitude data in params 5 and 6, as it allows for greater precision. Param 5 and 6 encode positional data as scaled integers, where the scaling depends on the actual command value. NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9668#[doc = ""]
9669#[doc = "ID: 75"]
9670#[derive(Debug, Clone, PartialEq)]
9671#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9672#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9673#[cfg_attr(feature = "ts", derive(TS))]
9674#[cfg_attr(feature = "ts", ts(export))]
9675pub struct COMMAND_INT_DATA {
9676    #[doc = "PARAM1, see MAV_CMD enum"]
9677    pub param1: f32,
9678    #[doc = "PARAM2, see MAV_CMD enum"]
9679    pub param2: f32,
9680    #[doc = "PARAM3, see MAV_CMD enum"]
9681    pub param3: f32,
9682    #[doc = "PARAM4, see MAV_CMD enum"]
9683    pub param4: f32,
9684    #[doc = "PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7"]
9685    pub x: i32,
9686    #[doc = "PARAM6 / local: y position in meters * 1e4, global: longitude in degrees * 10^7"]
9687    pub y: i32,
9688    #[doc = "PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame)."]
9689    pub z: f32,
9690    #[doc = "The scheduled action for the mission item."]
9691    pub command: MavCmd,
9692    #[doc = "System ID"]
9693    pub target_system: u8,
9694    #[doc = "Component ID"]
9695    pub target_component: u8,
9696    #[doc = "The coordinate system of the COMMAND."]
9697    pub frame: MavFrame,
9698    #[doc = "Not used."]
9699    pub current: u8,
9700    #[doc = "Not used (set 0)."]
9701    pub autocontinue: u8,
9702}
9703impl COMMAND_INT_DATA {
9704    pub const ENCODED_LEN: usize = 35usize;
9705    pub const DEFAULT: Self = Self {
9706        param1: 0.0_f32,
9707        param2: 0.0_f32,
9708        param3: 0.0_f32,
9709        param4: 0.0_f32,
9710        x: 0_i32,
9711        y: 0_i32,
9712        z: 0.0_f32,
9713        command: MavCmd::DEFAULT,
9714        target_system: 0_u8,
9715        target_component: 0_u8,
9716        frame: MavFrame::DEFAULT,
9717        current: 0_u8,
9718        autocontinue: 0_u8,
9719    };
9720    #[cfg(feature = "arbitrary")]
9721    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9722        use arbitrary::{Arbitrary, Unstructured};
9723        let mut buf = [0u8; 1024];
9724        rng.fill_bytes(&mut buf);
9725        let mut unstructured = Unstructured::new(&buf);
9726        Self::arbitrary(&mut unstructured).unwrap_or_default()
9727    }
9728}
9729impl Default for COMMAND_INT_DATA {
9730    fn default() -> Self {
9731        Self::DEFAULT.clone()
9732    }
9733}
9734impl MessageData for COMMAND_INT_DATA {
9735    type Message = MavMessage;
9736    const ID: u32 = 75u32;
9737    const NAME: &'static str = "COMMAND_INT";
9738    const EXTRA_CRC: u8 = 158u8;
9739    const ENCODED_LEN: usize = 35usize;
9740    fn deser(
9741        _version: MavlinkVersion,
9742        __input: &[u8],
9743    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9744        let avail_len = __input.len();
9745        let mut payload_buf = [0; Self::ENCODED_LEN];
9746        let mut buf = if avail_len < Self::ENCODED_LEN {
9747            payload_buf[0..avail_len].copy_from_slice(__input);
9748            Bytes::new(&payload_buf)
9749        } else {
9750            Bytes::new(__input)
9751        };
9752        let mut __struct = Self::default();
9753        __struct.param1 = buf.get_f32_le();
9754        __struct.param2 = buf.get_f32_le();
9755        __struct.param3 = buf.get_f32_le();
9756        __struct.param4 = buf.get_f32_le();
9757        __struct.x = buf.get_i32_le();
9758        __struct.y = buf.get_i32_le();
9759        __struct.z = buf.get_f32_le();
9760        let tmp = buf.get_u16_le();
9761        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9762            ::mavlink_core::error::ParserError::InvalidEnum {
9763                enum_type: "MavCmd",
9764                value: tmp as u32,
9765            },
9766        )?;
9767        __struct.target_system = buf.get_u8();
9768        __struct.target_component = buf.get_u8();
9769        let tmp = buf.get_u8();
9770        __struct.frame =
9771            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9772                enum_type: "MavFrame",
9773                value: tmp as u32,
9774            })?;
9775        __struct.current = buf.get_u8();
9776        __struct.autocontinue = buf.get_u8();
9777        Ok(__struct)
9778    }
9779    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9780        let mut __tmp = BytesMut::new(bytes);
9781        #[allow(clippy::absurd_extreme_comparisons)]
9782        #[allow(unused_comparisons)]
9783        if __tmp.remaining() < Self::ENCODED_LEN {
9784            panic!(
9785                "buffer is too small (need {} bytes, but got {})",
9786                Self::ENCODED_LEN,
9787                __tmp.remaining(),
9788            )
9789        }
9790        __tmp.put_f32_le(self.param1);
9791        __tmp.put_f32_le(self.param2);
9792        __tmp.put_f32_le(self.param3);
9793        __tmp.put_f32_le(self.param4);
9794        __tmp.put_i32_le(self.x);
9795        __tmp.put_i32_le(self.y);
9796        __tmp.put_f32_le(self.z);
9797        __tmp.put_u16_le(self.command as u16);
9798        __tmp.put_u8(self.target_system);
9799        __tmp.put_u8(self.target_component);
9800        __tmp.put_u8(self.frame as u8);
9801        __tmp.put_u8(self.current);
9802        __tmp.put_u8(self.autocontinue);
9803        if matches!(version, MavlinkVersion::V2) {
9804            let len = __tmp.len();
9805            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9806        } else {
9807            __tmp.len()
9808        }
9809    }
9810}
9811#[doc = "Message encoding a command with parameters as scaled integers and additional metadata. Scaling depends on the actual command value."]
9812#[doc = ""]
9813#[doc = "ID: 223"]
9814#[derive(Debug, Clone, PartialEq)]
9815#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9816#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9817#[cfg_attr(feature = "ts", derive(TS))]
9818#[cfg_attr(feature = "ts", ts(export))]
9819pub struct COMMAND_INT_STAMPED_DATA {
9820    #[doc = "Microseconds elapsed since vehicle boot"]
9821    pub vehicle_timestamp: u64,
9822    #[doc = "UTC time, seconds elapsed since 01.01.1970"]
9823    pub utc_time: u32,
9824    #[doc = "PARAM1, see MAV_CMD enum"]
9825    pub param1: f32,
9826    #[doc = "PARAM2, see MAV_CMD enum"]
9827    pub param2: f32,
9828    #[doc = "PARAM3, see MAV_CMD enum"]
9829    pub param3: f32,
9830    #[doc = "PARAM4, see MAV_CMD enum"]
9831    pub param4: f32,
9832    #[doc = "PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7"]
9833    pub x: i32,
9834    #[doc = "PARAM6 / local: y position in meters * 1e4, global: longitude in degrees * 10^7"]
9835    pub y: i32,
9836    #[doc = "PARAM7 / z position: global: altitude in meters (MSL, WGS84, AGL or relative to home - depending on frame)."]
9837    pub z: f32,
9838    #[doc = "The scheduled action for the mission item, as defined by MAV_CMD enum"]
9839    pub command: MavCmd,
9840    #[doc = "System ID"]
9841    pub target_system: u8,
9842    #[doc = "Component ID"]
9843    pub target_component: u8,
9844    #[doc = "The coordinate system of the COMMAND, as defined by MAV_FRAME enum"]
9845    pub frame: MavFrame,
9846    #[doc = "false:0, true:1"]
9847    pub current: u8,
9848    #[doc = "autocontinue to next wp"]
9849    pub autocontinue: u8,
9850}
9851impl COMMAND_INT_STAMPED_DATA {
9852    pub const ENCODED_LEN: usize = 47usize;
9853    pub const DEFAULT: Self = Self {
9854        vehicle_timestamp: 0_u64,
9855        utc_time: 0_u32,
9856        param1: 0.0_f32,
9857        param2: 0.0_f32,
9858        param3: 0.0_f32,
9859        param4: 0.0_f32,
9860        x: 0_i32,
9861        y: 0_i32,
9862        z: 0.0_f32,
9863        command: MavCmd::DEFAULT,
9864        target_system: 0_u8,
9865        target_component: 0_u8,
9866        frame: MavFrame::DEFAULT,
9867        current: 0_u8,
9868        autocontinue: 0_u8,
9869    };
9870    #[cfg(feature = "arbitrary")]
9871    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9872        use arbitrary::{Arbitrary, Unstructured};
9873        let mut buf = [0u8; 1024];
9874        rng.fill_bytes(&mut buf);
9875        let mut unstructured = Unstructured::new(&buf);
9876        Self::arbitrary(&mut unstructured).unwrap_or_default()
9877    }
9878}
9879impl Default for COMMAND_INT_STAMPED_DATA {
9880    fn default() -> Self {
9881        Self::DEFAULT.clone()
9882    }
9883}
9884impl MessageData for COMMAND_INT_STAMPED_DATA {
9885    type Message = MavMessage;
9886    const ID: u32 = 223u32;
9887    const NAME: &'static str = "COMMAND_INT_STAMPED";
9888    const EXTRA_CRC: u8 = 119u8;
9889    const ENCODED_LEN: usize = 47usize;
9890    fn deser(
9891        _version: MavlinkVersion,
9892        __input: &[u8],
9893    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9894        let avail_len = __input.len();
9895        let mut payload_buf = [0; Self::ENCODED_LEN];
9896        let mut buf = if avail_len < Self::ENCODED_LEN {
9897            payload_buf[0..avail_len].copy_from_slice(__input);
9898            Bytes::new(&payload_buf)
9899        } else {
9900            Bytes::new(__input)
9901        };
9902        let mut __struct = Self::default();
9903        __struct.vehicle_timestamp = buf.get_u64_le();
9904        __struct.utc_time = buf.get_u32_le();
9905        __struct.param1 = buf.get_f32_le();
9906        __struct.param2 = buf.get_f32_le();
9907        __struct.param3 = buf.get_f32_le();
9908        __struct.param4 = buf.get_f32_le();
9909        __struct.x = buf.get_i32_le();
9910        __struct.y = buf.get_i32_le();
9911        __struct.z = buf.get_f32_le();
9912        let tmp = buf.get_u16_le();
9913        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9914            ::mavlink_core::error::ParserError::InvalidEnum {
9915                enum_type: "MavCmd",
9916                value: tmp as u32,
9917            },
9918        )?;
9919        __struct.target_system = buf.get_u8();
9920        __struct.target_component = buf.get_u8();
9921        let tmp = buf.get_u8();
9922        __struct.frame =
9923            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9924                enum_type: "MavFrame",
9925                value: tmp as u32,
9926            })?;
9927        __struct.current = buf.get_u8();
9928        __struct.autocontinue = buf.get_u8();
9929        Ok(__struct)
9930    }
9931    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9932        let mut __tmp = BytesMut::new(bytes);
9933        #[allow(clippy::absurd_extreme_comparisons)]
9934        #[allow(unused_comparisons)]
9935        if __tmp.remaining() < Self::ENCODED_LEN {
9936            panic!(
9937                "buffer is too small (need {} bytes, but got {})",
9938                Self::ENCODED_LEN,
9939                __tmp.remaining(),
9940            )
9941        }
9942        __tmp.put_u64_le(self.vehicle_timestamp);
9943        __tmp.put_u32_le(self.utc_time);
9944        __tmp.put_f32_le(self.param1);
9945        __tmp.put_f32_le(self.param2);
9946        __tmp.put_f32_le(self.param3);
9947        __tmp.put_f32_le(self.param4);
9948        __tmp.put_i32_le(self.x);
9949        __tmp.put_i32_le(self.y);
9950        __tmp.put_f32_le(self.z);
9951        __tmp.put_u16_le(self.command as u16);
9952        __tmp.put_u8(self.target_system);
9953        __tmp.put_u8(self.target_component);
9954        __tmp.put_u8(self.frame as u8);
9955        __tmp.put_u8(self.current);
9956        __tmp.put_u8(self.autocontinue);
9957        if matches!(version, MavlinkVersion::V2) {
9958            let len = __tmp.len();
9959            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9960        } else {
9961            __tmp.len()
9962        }
9963    }
9964}
9965#[doc = "Send a command with up to seven parameters to the MAV. COMMAND_INT is generally preferred when sending MAV_CMD commands that include positional information; it offers higher precision and allows the MAV_FRAME to be specified (which may otherwise be ambiguous, particularly for altitude). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9966#[doc = ""]
9967#[doc = "ID: 76"]
9968#[derive(Debug, Clone, PartialEq)]
9969#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9970#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9971#[cfg_attr(feature = "ts", derive(TS))]
9972#[cfg_attr(feature = "ts", ts(export))]
9973pub struct COMMAND_LONG_DATA {
9974    #[doc = "Parameter 1 (for the specific command)."]
9975    pub param1: f32,
9976    #[doc = "Parameter 2 (for the specific command)."]
9977    pub param2: f32,
9978    #[doc = "Parameter 3 (for the specific command)."]
9979    pub param3: f32,
9980    #[doc = "Parameter 4 (for the specific command)."]
9981    pub param4: f32,
9982    #[doc = "Parameter 5 (for the specific command)."]
9983    pub param5: f32,
9984    #[doc = "Parameter 6 (for the specific command)."]
9985    pub param6: f32,
9986    #[doc = "Parameter 7 (for the specific command)."]
9987    pub param7: f32,
9988    #[doc = "Command ID (of command to send)."]
9989    pub command: MavCmd,
9990    #[doc = "System which should execute the command"]
9991    pub target_system: u8,
9992    #[doc = "Component which should execute the command, 0 for all components"]
9993    pub target_component: u8,
9994    #[doc = "0: First transmission of this command. 1-255: Confirmation transmissions (e.g. for kill command)"]
9995    pub confirmation: u8,
9996}
9997impl COMMAND_LONG_DATA {
9998    pub const ENCODED_LEN: usize = 33usize;
9999    pub const DEFAULT: Self = Self {
10000        param1: 0.0_f32,
10001        param2: 0.0_f32,
10002        param3: 0.0_f32,
10003        param4: 0.0_f32,
10004        param5: 0.0_f32,
10005        param6: 0.0_f32,
10006        param7: 0.0_f32,
10007        command: MavCmd::DEFAULT,
10008        target_system: 0_u8,
10009        target_component: 0_u8,
10010        confirmation: 0_u8,
10011    };
10012    #[cfg(feature = "arbitrary")]
10013    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10014        use arbitrary::{Arbitrary, Unstructured};
10015        let mut buf = [0u8; 1024];
10016        rng.fill_bytes(&mut buf);
10017        let mut unstructured = Unstructured::new(&buf);
10018        Self::arbitrary(&mut unstructured).unwrap_or_default()
10019    }
10020}
10021impl Default for COMMAND_LONG_DATA {
10022    fn default() -> Self {
10023        Self::DEFAULT.clone()
10024    }
10025}
10026impl MessageData for COMMAND_LONG_DATA {
10027    type Message = MavMessage;
10028    const ID: u32 = 76u32;
10029    const NAME: &'static str = "COMMAND_LONG";
10030    const EXTRA_CRC: u8 = 152u8;
10031    const ENCODED_LEN: usize = 33usize;
10032    fn deser(
10033        _version: MavlinkVersion,
10034        __input: &[u8],
10035    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10036        let avail_len = __input.len();
10037        let mut payload_buf = [0; Self::ENCODED_LEN];
10038        let mut buf = if avail_len < Self::ENCODED_LEN {
10039            payload_buf[0..avail_len].copy_from_slice(__input);
10040            Bytes::new(&payload_buf)
10041        } else {
10042            Bytes::new(__input)
10043        };
10044        let mut __struct = Self::default();
10045        __struct.param1 = buf.get_f32_le();
10046        __struct.param2 = buf.get_f32_le();
10047        __struct.param3 = buf.get_f32_le();
10048        __struct.param4 = buf.get_f32_le();
10049        __struct.param5 = buf.get_f32_le();
10050        __struct.param6 = buf.get_f32_le();
10051        __struct.param7 = buf.get_f32_le();
10052        let tmp = buf.get_u16_le();
10053        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
10054            ::mavlink_core::error::ParserError::InvalidEnum {
10055                enum_type: "MavCmd",
10056                value: tmp as u32,
10057            },
10058        )?;
10059        __struct.target_system = buf.get_u8();
10060        __struct.target_component = buf.get_u8();
10061        __struct.confirmation = buf.get_u8();
10062        Ok(__struct)
10063    }
10064    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10065        let mut __tmp = BytesMut::new(bytes);
10066        #[allow(clippy::absurd_extreme_comparisons)]
10067        #[allow(unused_comparisons)]
10068        if __tmp.remaining() < Self::ENCODED_LEN {
10069            panic!(
10070                "buffer is too small (need {} bytes, but got {})",
10071                Self::ENCODED_LEN,
10072                __tmp.remaining(),
10073            )
10074        }
10075        __tmp.put_f32_le(self.param1);
10076        __tmp.put_f32_le(self.param2);
10077        __tmp.put_f32_le(self.param3);
10078        __tmp.put_f32_le(self.param4);
10079        __tmp.put_f32_le(self.param5);
10080        __tmp.put_f32_le(self.param6);
10081        __tmp.put_f32_le(self.param7);
10082        __tmp.put_u16_le(self.command as u16);
10083        __tmp.put_u8(self.target_system);
10084        __tmp.put_u8(self.target_component);
10085        __tmp.put_u8(self.confirmation);
10086        if matches!(version, MavlinkVersion::V2) {
10087            let len = __tmp.len();
10088            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10089        } else {
10090            __tmp.len()
10091        }
10092    }
10093}
10094#[doc = "Send a command with up to seven parameters to the MAV and additional metadata."]
10095#[doc = ""]
10096#[doc = "ID: 224"]
10097#[derive(Debug, Clone, PartialEq)]
10098#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10099#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10100#[cfg_attr(feature = "ts", derive(TS))]
10101#[cfg_attr(feature = "ts", ts(export))]
10102pub struct COMMAND_LONG_STAMPED_DATA {
10103    #[doc = "Microseconds elapsed since vehicle boot"]
10104    pub vehicle_timestamp: u64,
10105    #[doc = "UTC time, seconds elapsed since 01.01.1970"]
10106    pub utc_time: u32,
10107    #[doc = "Parameter 1, as defined by MAV_CMD enum."]
10108    pub param1: f32,
10109    #[doc = "Parameter 2, as defined by MAV_CMD enum."]
10110    pub param2: f32,
10111    #[doc = "Parameter 3, as defined by MAV_CMD enum."]
10112    pub param3: f32,
10113    #[doc = "Parameter 4, as defined by MAV_CMD enum."]
10114    pub param4: f32,
10115    #[doc = "Parameter 5, as defined by MAV_CMD enum."]
10116    pub param5: f32,
10117    #[doc = "Parameter 6, as defined by MAV_CMD enum."]
10118    pub param6: f32,
10119    #[doc = "Parameter 7, as defined by MAV_CMD enum."]
10120    pub param7: f32,
10121    #[doc = "Command ID, as defined by MAV_CMD enum."]
10122    pub command: MavCmd,
10123    #[doc = "System which should execute the command"]
10124    pub target_system: u8,
10125    #[doc = "Component which should execute the command, 0 for all components"]
10126    pub target_component: u8,
10127    #[doc = "0: First transmission of this command. 1-255: Confirmation transmissions (e.g. for kill command)"]
10128    pub confirmation: u8,
10129}
10130impl COMMAND_LONG_STAMPED_DATA {
10131    pub const ENCODED_LEN: usize = 45usize;
10132    pub const DEFAULT: Self = Self {
10133        vehicle_timestamp: 0_u64,
10134        utc_time: 0_u32,
10135        param1: 0.0_f32,
10136        param2: 0.0_f32,
10137        param3: 0.0_f32,
10138        param4: 0.0_f32,
10139        param5: 0.0_f32,
10140        param6: 0.0_f32,
10141        param7: 0.0_f32,
10142        command: MavCmd::DEFAULT,
10143        target_system: 0_u8,
10144        target_component: 0_u8,
10145        confirmation: 0_u8,
10146    };
10147    #[cfg(feature = "arbitrary")]
10148    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10149        use arbitrary::{Arbitrary, Unstructured};
10150        let mut buf = [0u8; 1024];
10151        rng.fill_bytes(&mut buf);
10152        let mut unstructured = Unstructured::new(&buf);
10153        Self::arbitrary(&mut unstructured).unwrap_or_default()
10154    }
10155}
10156impl Default for COMMAND_LONG_STAMPED_DATA {
10157    fn default() -> Self {
10158        Self::DEFAULT.clone()
10159    }
10160}
10161impl MessageData for COMMAND_LONG_STAMPED_DATA {
10162    type Message = MavMessage;
10163    const ID: u32 = 224u32;
10164    const NAME: &'static str = "COMMAND_LONG_STAMPED";
10165    const EXTRA_CRC: u8 = 102u8;
10166    const ENCODED_LEN: usize = 45usize;
10167    fn deser(
10168        _version: MavlinkVersion,
10169        __input: &[u8],
10170    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10171        let avail_len = __input.len();
10172        let mut payload_buf = [0; Self::ENCODED_LEN];
10173        let mut buf = if avail_len < Self::ENCODED_LEN {
10174            payload_buf[0..avail_len].copy_from_slice(__input);
10175            Bytes::new(&payload_buf)
10176        } else {
10177            Bytes::new(__input)
10178        };
10179        let mut __struct = Self::default();
10180        __struct.vehicle_timestamp = buf.get_u64_le();
10181        __struct.utc_time = buf.get_u32_le();
10182        __struct.param1 = buf.get_f32_le();
10183        __struct.param2 = buf.get_f32_le();
10184        __struct.param3 = buf.get_f32_le();
10185        __struct.param4 = buf.get_f32_le();
10186        __struct.param5 = buf.get_f32_le();
10187        __struct.param6 = buf.get_f32_le();
10188        __struct.param7 = buf.get_f32_le();
10189        let tmp = buf.get_u16_le();
10190        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
10191            ::mavlink_core::error::ParserError::InvalidEnum {
10192                enum_type: "MavCmd",
10193                value: tmp as u32,
10194            },
10195        )?;
10196        __struct.target_system = buf.get_u8();
10197        __struct.target_component = buf.get_u8();
10198        __struct.confirmation = buf.get_u8();
10199        Ok(__struct)
10200    }
10201    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10202        let mut __tmp = BytesMut::new(bytes);
10203        #[allow(clippy::absurd_extreme_comparisons)]
10204        #[allow(unused_comparisons)]
10205        if __tmp.remaining() < Self::ENCODED_LEN {
10206            panic!(
10207                "buffer is too small (need {} bytes, but got {})",
10208                Self::ENCODED_LEN,
10209                __tmp.remaining(),
10210            )
10211        }
10212        __tmp.put_u64_le(self.vehicle_timestamp);
10213        __tmp.put_u32_le(self.utc_time);
10214        __tmp.put_f32_le(self.param1);
10215        __tmp.put_f32_le(self.param2);
10216        __tmp.put_f32_le(self.param3);
10217        __tmp.put_f32_le(self.param4);
10218        __tmp.put_f32_le(self.param5);
10219        __tmp.put_f32_le(self.param6);
10220        __tmp.put_f32_le(self.param7);
10221        __tmp.put_u16_le(self.command as u16);
10222        __tmp.put_u8(self.target_system);
10223        __tmp.put_u8(self.target_component);
10224        __tmp.put_u8(self.confirmation);
10225        if matches!(version, MavlinkVersion::V2) {
10226            let len = __tmp.len();
10227            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10228        } else {
10229            __tmp.len()
10230        }
10231    }
10232}
10233#[deprecated = " See `COMPONENT_METADATA` (Deprecated since 2022-04)"]
10234#[doc = "Component information message, which may be requested using MAV_CMD_REQUEST_MESSAGE."]
10235#[doc = ""]
10236#[doc = "ID: 395"]
10237#[derive(Debug, Clone, PartialEq)]
10238#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10239#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10240#[cfg_attr(feature = "ts", derive(TS))]
10241#[cfg_attr(feature = "ts", ts(export))]
10242pub struct COMPONENT_INFORMATION_DATA {
10243    #[doc = "Timestamp (time since system boot)."]
10244    pub time_boot_ms: u32,
10245    #[doc = "CRC32 of the general metadata file (general_metadata_uri)."]
10246    pub general_metadata_file_crc: u32,
10247    #[doc = "CRC32 of peripherals metadata file (peripherals_metadata_uri)."]
10248    pub peripherals_metadata_file_crc: u32,
10249    #[doc = "MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated."]
10250    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10251    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10252    pub general_metadata_uri: [u8; 100],
10253    #[doc = "(Optional) MAVLink FTP URI for the peripherals metadata file (COMP_METADATA_TYPE_PERIPHERALS), which may be compressed with xz. This contains data about \"attached components\" such as UAVCAN nodes. The peripherals are in a separate file because the information must be generated dynamically at runtime. The string needs to be zero terminated."]
10254    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10255    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10256    pub peripherals_metadata_uri: [u8; 100],
10257}
10258impl COMPONENT_INFORMATION_DATA {
10259    pub const ENCODED_LEN: usize = 212usize;
10260    pub const DEFAULT: Self = Self {
10261        time_boot_ms: 0_u32,
10262        general_metadata_file_crc: 0_u32,
10263        peripherals_metadata_file_crc: 0_u32,
10264        general_metadata_uri: [0_u8; 100usize],
10265        peripherals_metadata_uri: [0_u8; 100usize],
10266    };
10267    #[cfg(feature = "arbitrary")]
10268    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10269        use arbitrary::{Arbitrary, Unstructured};
10270        let mut buf = [0u8; 1024];
10271        rng.fill_bytes(&mut buf);
10272        let mut unstructured = Unstructured::new(&buf);
10273        Self::arbitrary(&mut unstructured).unwrap_or_default()
10274    }
10275}
10276impl Default for COMPONENT_INFORMATION_DATA {
10277    fn default() -> Self {
10278        Self::DEFAULT.clone()
10279    }
10280}
10281impl MessageData for COMPONENT_INFORMATION_DATA {
10282    type Message = MavMessage;
10283    const ID: u32 = 395u32;
10284    const NAME: &'static str = "COMPONENT_INFORMATION";
10285    const EXTRA_CRC: u8 = 0u8;
10286    const ENCODED_LEN: usize = 212usize;
10287    fn deser(
10288        _version: MavlinkVersion,
10289        __input: &[u8],
10290    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10291        let avail_len = __input.len();
10292        let mut payload_buf = [0; Self::ENCODED_LEN];
10293        let mut buf = if avail_len < Self::ENCODED_LEN {
10294            payload_buf[0..avail_len].copy_from_slice(__input);
10295            Bytes::new(&payload_buf)
10296        } else {
10297            Bytes::new(__input)
10298        };
10299        let mut __struct = Self::default();
10300        __struct.time_boot_ms = buf.get_u32_le();
10301        __struct.general_metadata_file_crc = buf.get_u32_le();
10302        __struct.peripherals_metadata_file_crc = buf.get_u32_le();
10303        for v in &mut __struct.general_metadata_uri {
10304            let val = buf.get_u8();
10305            *v = val;
10306        }
10307        for v in &mut __struct.peripherals_metadata_uri {
10308            let val = buf.get_u8();
10309            *v = val;
10310        }
10311        Ok(__struct)
10312    }
10313    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10314        let mut __tmp = BytesMut::new(bytes);
10315        #[allow(clippy::absurd_extreme_comparisons)]
10316        #[allow(unused_comparisons)]
10317        if __tmp.remaining() < Self::ENCODED_LEN {
10318            panic!(
10319                "buffer is too small (need {} bytes, but got {})",
10320                Self::ENCODED_LEN,
10321                __tmp.remaining(),
10322            )
10323        }
10324        __tmp.put_u32_le(self.time_boot_ms);
10325        __tmp.put_u32_le(self.general_metadata_file_crc);
10326        __tmp.put_u32_le(self.peripherals_metadata_file_crc);
10327        for val in &self.general_metadata_uri {
10328            __tmp.put_u8(*val);
10329        }
10330        for val in &self.peripherals_metadata_uri {
10331            __tmp.put_u8(*val);
10332        }
10333        if matches!(version, MavlinkVersion::V2) {
10334            let len = __tmp.len();
10335            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10336        } else {
10337            __tmp.len()
10338        }
10339    }
10340}
10341#[doc = "Basic component information data. Should be requested using MAV_CMD_REQUEST_MESSAGE on startup, or when required."]
10342#[doc = ""]
10343#[doc = "ID: 396"]
10344#[derive(Debug, Clone, PartialEq)]
10345#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10346#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10347#[cfg_attr(feature = "ts", derive(TS))]
10348#[cfg_attr(feature = "ts", ts(export))]
10349pub struct COMPONENT_INFORMATION_BASIC_DATA {
10350    #[doc = "Component capability flags"]
10351    pub capabilities: MavProtocolCapability,
10352    #[doc = "Timestamp (time since system boot)."]
10353    pub time_boot_ms: u32,
10354    #[doc = "Date of manufacture as a UNIX Epoch time (since 1.1.1970) in seconds."]
10355    pub time_manufacture_s: u32,
10356    #[doc = "Name of the component vendor. Needs to be zero terminated. The field is optional and can be empty/all zeros."]
10357    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10358    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10359    pub vendor_name: [u8; 32],
10360    #[doc = "Name of the component model. Needs to be zero terminated. The field is optional and can be empty/all zeros."]
10361    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10362    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10363    pub model_name: [u8; 32],
10364    #[doc = "Software version. The recommended format is SEMVER: 'major.minor.patch'  (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
10365    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10366    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10367    pub software_version: [u8; 24],
10368    #[doc = "Hardware version. The recommended format is SEMVER: 'major.minor.patch'  (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
10369    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10370    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10371    pub hardware_version: [u8; 24],
10372    #[doc = "Hardware serial number. The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
10373    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10374    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10375    pub serial_number: [u8; 32],
10376}
10377impl COMPONENT_INFORMATION_BASIC_DATA {
10378    pub const ENCODED_LEN: usize = 160usize;
10379    pub const DEFAULT: Self = Self {
10380        capabilities: MavProtocolCapability::DEFAULT,
10381        time_boot_ms: 0_u32,
10382        time_manufacture_s: 0_u32,
10383        vendor_name: [0_u8; 32usize],
10384        model_name: [0_u8; 32usize],
10385        software_version: [0_u8; 24usize],
10386        hardware_version: [0_u8; 24usize],
10387        serial_number: [0_u8; 32usize],
10388    };
10389    #[cfg(feature = "arbitrary")]
10390    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10391        use arbitrary::{Arbitrary, Unstructured};
10392        let mut buf = [0u8; 1024];
10393        rng.fill_bytes(&mut buf);
10394        let mut unstructured = Unstructured::new(&buf);
10395        Self::arbitrary(&mut unstructured).unwrap_or_default()
10396    }
10397}
10398impl Default for COMPONENT_INFORMATION_BASIC_DATA {
10399    fn default() -> Self {
10400        Self::DEFAULT.clone()
10401    }
10402}
10403impl MessageData for COMPONENT_INFORMATION_BASIC_DATA {
10404    type Message = MavMessage;
10405    const ID: u32 = 396u32;
10406    const NAME: &'static str = "COMPONENT_INFORMATION_BASIC";
10407    const EXTRA_CRC: u8 = 50u8;
10408    const ENCODED_LEN: usize = 160usize;
10409    fn deser(
10410        _version: MavlinkVersion,
10411        __input: &[u8],
10412    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10413        let avail_len = __input.len();
10414        let mut payload_buf = [0; Self::ENCODED_LEN];
10415        let mut buf = if avail_len < Self::ENCODED_LEN {
10416            payload_buf[0..avail_len].copy_from_slice(__input);
10417            Bytes::new(&payload_buf)
10418        } else {
10419            Bytes::new(__input)
10420        };
10421        let mut __struct = Self::default();
10422        let tmp = buf.get_u64_le();
10423        __struct.capabilities = MavProtocolCapability::from_bits(
10424            tmp & MavProtocolCapability::all().bits(),
10425        )
10426        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
10427            flag_type: "MavProtocolCapability",
10428            value: tmp as u32,
10429        })?;
10430        __struct.time_boot_ms = buf.get_u32_le();
10431        __struct.time_manufacture_s = buf.get_u32_le();
10432        for v in &mut __struct.vendor_name {
10433            let val = buf.get_u8();
10434            *v = val;
10435        }
10436        for v in &mut __struct.model_name {
10437            let val = buf.get_u8();
10438            *v = val;
10439        }
10440        for v in &mut __struct.software_version {
10441            let val = buf.get_u8();
10442            *v = val;
10443        }
10444        for v in &mut __struct.hardware_version {
10445            let val = buf.get_u8();
10446            *v = val;
10447        }
10448        for v in &mut __struct.serial_number {
10449            let val = buf.get_u8();
10450            *v = val;
10451        }
10452        Ok(__struct)
10453    }
10454    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10455        let mut __tmp = BytesMut::new(bytes);
10456        #[allow(clippy::absurd_extreme_comparisons)]
10457        #[allow(unused_comparisons)]
10458        if __tmp.remaining() < Self::ENCODED_LEN {
10459            panic!(
10460                "buffer is too small (need {} bytes, but got {})",
10461                Self::ENCODED_LEN,
10462                __tmp.remaining(),
10463            )
10464        }
10465        __tmp.put_u64_le(self.capabilities.bits());
10466        __tmp.put_u32_le(self.time_boot_ms);
10467        __tmp.put_u32_le(self.time_manufacture_s);
10468        for val in &self.vendor_name {
10469            __tmp.put_u8(*val);
10470        }
10471        for val in &self.model_name {
10472            __tmp.put_u8(*val);
10473        }
10474        for val in &self.software_version {
10475            __tmp.put_u8(*val);
10476        }
10477        for val in &self.hardware_version {
10478            __tmp.put_u8(*val);
10479        }
10480        for val in &self.serial_number {
10481            __tmp.put_u8(*val);
10482        }
10483        if matches!(version, MavlinkVersion::V2) {
10484            let len = __tmp.len();
10485            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10486        } else {
10487            __tmp.len()
10488        }
10489    }
10490}
10491#[doc = "Component metadata message, which may be requested using MAV_CMD_REQUEST_MESSAGE.          This contains the MAVLink FTP URI and CRC for the component's general metadata file.         The file must be hosted on the component, and may be xz compressed.         The file CRC can be used for file caching.          The general metadata file can be read to get the locations of other metadata files (COMP_METADATA_TYPE) and translations, which may be hosted either on the vehicle or the internet.         For more information see: <https://mavlink.io/en/services/component_information.html>.          Note: Camera components should use CAMERA_INFORMATION instead, and autopilots may use both this message and AUTOPILOT_VERSION."]
10492#[doc = ""]
10493#[doc = "ID: 397"]
10494#[derive(Debug, Clone, PartialEq)]
10495#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10496#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10497#[cfg_attr(feature = "ts", derive(TS))]
10498#[cfg_attr(feature = "ts", ts(export))]
10499pub struct COMPONENT_METADATA_DATA {
10500    #[doc = "Timestamp (time since system boot)."]
10501    pub time_boot_ms: u32,
10502    #[doc = "CRC32 of the general metadata file."]
10503    pub file_crc: u32,
10504    #[doc = "MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated."]
10505    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10506    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10507    pub uri: [u8; 100],
10508}
10509impl COMPONENT_METADATA_DATA {
10510    pub const ENCODED_LEN: usize = 108usize;
10511    pub const DEFAULT: Self = Self {
10512        time_boot_ms: 0_u32,
10513        file_crc: 0_u32,
10514        uri: [0_u8; 100usize],
10515    };
10516    #[cfg(feature = "arbitrary")]
10517    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10518        use arbitrary::{Arbitrary, Unstructured};
10519        let mut buf = [0u8; 1024];
10520        rng.fill_bytes(&mut buf);
10521        let mut unstructured = Unstructured::new(&buf);
10522        Self::arbitrary(&mut unstructured).unwrap_or_default()
10523    }
10524}
10525impl Default for COMPONENT_METADATA_DATA {
10526    fn default() -> Self {
10527        Self::DEFAULT.clone()
10528    }
10529}
10530impl MessageData for COMPONENT_METADATA_DATA {
10531    type Message = MavMessage;
10532    const ID: u32 = 397u32;
10533    const NAME: &'static str = "COMPONENT_METADATA";
10534    const EXTRA_CRC: u8 = 182u8;
10535    const ENCODED_LEN: usize = 108usize;
10536    fn deser(
10537        _version: MavlinkVersion,
10538        __input: &[u8],
10539    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10540        let avail_len = __input.len();
10541        let mut payload_buf = [0; Self::ENCODED_LEN];
10542        let mut buf = if avail_len < Self::ENCODED_LEN {
10543            payload_buf[0..avail_len].copy_from_slice(__input);
10544            Bytes::new(&payload_buf)
10545        } else {
10546            Bytes::new(__input)
10547        };
10548        let mut __struct = Self::default();
10549        __struct.time_boot_ms = buf.get_u32_le();
10550        __struct.file_crc = buf.get_u32_le();
10551        for v in &mut __struct.uri {
10552            let val = buf.get_u8();
10553            *v = val;
10554        }
10555        Ok(__struct)
10556    }
10557    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10558        let mut __tmp = BytesMut::new(bytes);
10559        #[allow(clippy::absurd_extreme_comparisons)]
10560        #[allow(unused_comparisons)]
10561        if __tmp.remaining() < Self::ENCODED_LEN {
10562            panic!(
10563                "buffer is too small (need {} bytes, but got {})",
10564                Self::ENCODED_LEN,
10565                __tmp.remaining(),
10566            )
10567        }
10568        __tmp.put_u32_le(self.time_boot_ms);
10569        __tmp.put_u32_le(self.file_crc);
10570        for val in &self.uri {
10571            __tmp.put_u8(*val);
10572        }
10573        if matches!(version, MavlinkVersion::V2) {
10574            let len = __tmp.len();
10575            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10576        } else {
10577            __tmp.len()
10578        }
10579    }
10580}
10581#[doc = "The smoothed, monotonic system state used to feed the control loops of the system."]
10582#[doc = ""]
10583#[doc = "ID: 146"]
10584#[derive(Debug, Clone, PartialEq)]
10585#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10586#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10587#[cfg_attr(feature = "ts", derive(TS))]
10588#[cfg_attr(feature = "ts", ts(export))]
10589pub struct CONTROL_SYSTEM_STATE_DATA {
10590    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
10591    pub time_usec: u64,
10592    #[doc = "X acceleration in body frame"]
10593    pub x_acc: f32,
10594    #[doc = "Y acceleration in body frame"]
10595    pub y_acc: f32,
10596    #[doc = "Z acceleration in body frame"]
10597    pub z_acc: f32,
10598    #[doc = "X velocity in body frame"]
10599    pub x_vel: f32,
10600    #[doc = "Y velocity in body frame"]
10601    pub y_vel: f32,
10602    #[doc = "Z velocity in body frame"]
10603    pub z_vel: f32,
10604    #[doc = "X position in local frame"]
10605    pub x_pos: f32,
10606    #[doc = "Y position in local frame"]
10607    pub y_pos: f32,
10608    #[doc = "Z position in local frame"]
10609    pub z_pos: f32,
10610    #[doc = "Airspeed, set to -1 if unknown"]
10611    pub airspeed: f32,
10612    #[doc = "Variance of body velocity estimate"]
10613    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10614    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10615    pub vel_variance: [f32; 3],
10616    #[doc = "Variance in local position"]
10617    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10618    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10619    pub pos_variance: [f32; 3],
10620    #[doc = "The attitude, represented as Quaternion"]
10621    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10622    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10623    pub q: [f32; 4],
10624    #[doc = "Angular rate in roll axis"]
10625    pub roll_rate: f32,
10626    #[doc = "Angular rate in pitch axis"]
10627    pub pitch_rate: f32,
10628    #[doc = "Angular rate in yaw axis"]
10629    pub yaw_rate: f32,
10630}
10631impl CONTROL_SYSTEM_STATE_DATA {
10632    pub const ENCODED_LEN: usize = 100usize;
10633    pub const DEFAULT: Self = Self {
10634        time_usec: 0_u64,
10635        x_acc: 0.0_f32,
10636        y_acc: 0.0_f32,
10637        z_acc: 0.0_f32,
10638        x_vel: 0.0_f32,
10639        y_vel: 0.0_f32,
10640        z_vel: 0.0_f32,
10641        x_pos: 0.0_f32,
10642        y_pos: 0.0_f32,
10643        z_pos: 0.0_f32,
10644        airspeed: 0.0_f32,
10645        vel_variance: [0.0_f32; 3usize],
10646        pos_variance: [0.0_f32; 3usize],
10647        q: [0.0_f32; 4usize],
10648        roll_rate: 0.0_f32,
10649        pitch_rate: 0.0_f32,
10650        yaw_rate: 0.0_f32,
10651    };
10652    #[cfg(feature = "arbitrary")]
10653    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10654        use arbitrary::{Arbitrary, Unstructured};
10655        let mut buf = [0u8; 1024];
10656        rng.fill_bytes(&mut buf);
10657        let mut unstructured = Unstructured::new(&buf);
10658        Self::arbitrary(&mut unstructured).unwrap_or_default()
10659    }
10660}
10661impl Default for CONTROL_SYSTEM_STATE_DATA {
10662    fn default() -> Self {
10663        Self::DEFAULT.clone()
10664    }
10665}
10666impl MessageData for CONTROL_SYSTEM_STATE_DATA {
10667    type Message = MavMessage;
10668    const ID: u32 = 146u32;
10669    const NAME: &'static str = "CONTROL_SYSTEM_STATE";
10670    const EXTRA_CRC: u8 = 103u8;
10671    const ENCODED_LEN: usize = 100usize;
10672    fn deser(
10673        _version: MavlinkVersion,
10674        __input: &[u8],
10675    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10676        let avail_len = __input.len();
10677        let mut payload_buf = [0; Self::ENCODED_LEN];
10678        let mut buf = if avail_len < Self::ENCODED_LEN {
10679            payload_buf[0..avail_len].copy_from_slice(__input);
10680            Bytes::new(&payload_buf)
10681        } else {
10682            Bytes::new(__input)
10683        };
10684        let mut __struct = Self::default();
10685        __struct.time_usec = buf.get_u64_le();
10686        __struct.x_acc = buf.get_f32_le();
10687        __struct.y_acc = buf.get_f32_le();
10688        __struct.z_acc = buf.get_f32_le();
10689        __struct.x_vel = buf.get_f32_le();
10690        __struct.y_vel = buf.get_f32_le();
10691        __struct.z_vel = buf.get_f32_le();
10692        __struct.x_pos = buf.get_f32_le();
10693        __struct.y_pos = buf.get_f32_le();
10694        __struct.z_pos = buf.get_f32_le();
10695        __struct.airspeed = buf.get_f32_le();
10696        for v in &mut __struct.vel_variance {
10697            let val = buf.get_f32_le();
10698            *v = val;
10699        }
10700        for v in &mut __struct.pos_variance {
10701            let val = buf.get_f32_le();
10702            *v = val;
10703        }
10704        for v in &mut __struct.q {
10705            let val = buf.get_f32_le();
10706            *v = val;
10707        }
10708        __struct.roll_rate = buf.get_f32_le();
10709        __struct.pitch_rate = buf.get_f32_le();
10710        __struct.yaw_rate = buf.get_f32_le();
10711        Ok(__struct)
10712    }
10713    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10714        let mut __tmp = BytesMut::new(bytes);
10715        #[allow(clippy::absurd_extreme_comparisons)]
10716        #[allow(unused_comparisons)]
10717        if __tmp.remaining() < Self::ENCODED_LEN {
10718            panic!(
10719                "buffer is too small (need {} bytes, but got {})",
10720                Self::ENCODED_LEN,
10721                __tmp.remaining(),
10722            )
10723        }
10724        __tmp.put_u64_le(self.time_usec);
10725        __tmp.put_f32_le(self.x_acc);
10726        __tmp.put_f32_le(self.y_acc);
10727        __tmp.put_f32_le(self.z_acc);
10728        __tmp.put_f32_le(self.x_vel);
10729        __tmp.put_f32_le(self.y_vel);
10730        __tmp.put_f32_le(self.z_vel);
10731        __tmp.put_f32_le(self.x_pos);
10732        __tmp.put_f32_le(self.y_pos);
10733        __tmp.put_f32_le(self.z_pos);
10734        __tmp.put_f32_le(self.airspeed);
10735        for val in &self.vel_variance {
10736            __tmp.put_f32_le(*val);
10737        }
10738        for val in &self.pos_variance {
10739            __tmp.put_f32_le(*val);
10740        }
10741        for val in &self.q {
10742            __tmp.put_f32_le(*val);
10743        }
10744        __tmp.put_f32_le(self.roll_rate);
10745        __tmp.put_f32_le(self.pitch_rate);
10746        __tmp.put_f32_le(self.yaw_rate);
10747        if matches!(version, MavlinkVersion::V2) {
10748            let len = __tmp.len();
10749            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10750        } else {
10751            __tmp.len()
10752        }
10753    }
10754}
10755#[doc = "Regular broadcast for the current latest event sequence number for a component. This is used to check for dropped events."]
10756#[doc = ""]
10757#[doc = "ID: 411"]
10758#[derive(Debug, Clone, PartialEq)]
10759#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10760#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10761#[cfg_attr(feature = "ts", derive(TS))]
10762#[cfg_attr(feature = "ts", ts(export))]
10763pub struct CURRENT_EVENT_SEQUENCE_DATA {
10764    #[doc = "Sequence number."]
10765    pub sequence: u16,
10766    #[doc = "Flag bitset."]
10767    pub flags: MavEventCurrentSequenceFlags,
10768}
10769impl CURRENT_EVENT_SEQUENCE_DATA {
10770    pub const ENCODED_LEN: usize = 3usize;
10771    pub const DEFAULT: Self = Self {
10772        sequence: 0_u16,
10773        flags: MavEventCurrentSequenceFlags::DEFAULT,
10774    };
10775    #[cfg(feature = "arbitrary")]
10776    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10777        use arbitrary::{Arbitrary, Unstructured};
10778        let mut buf = [0u8; 1024];
10779        rng.fill_bytes(&mut buf);
10780        let mut unstructured = Unstructured::new(&buf);
10781        Self::arbitrary(&mut unstructured).unwrap_or_default()
10782    }
10783}
10784impl Default for CURRENT_EVENT_SEQUENCE_DATA {
10785    fn default() -> Self {
10786        Self::DEFAULT.clone()
10787    }
10788}
10789impl MessageData for CURRENT_EVENT_SEQUENCE_DATA {
10790    type Message = MavMessage;
10791    const ID: u32 = 411u32;
10792    const NAME: &'static str = "CURRENT_EVENT_SEQUENCE";
10793    const EXTRA_CRC: u8 = 106u8;
10794    const ENCODED_LEN: usize = 3usize;
10795    fn deser(
10796        _version: MavlinkVersion,
10797        __input: &[u8],
10798    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10799        let avail_len = __input.len();
10800        let mut payload_buf = [0; Self::ENCODED_LEN];
10801        let mut buf = if avail_len < Self::ENCODED_LEN {
10802            payload_buf[0..avail_len].copy_from_slice(__input);
10803            Bytes::new(&payload_buf)
10804        } else {
10805            Bytes::new(__input)
10806        };
10807        let mut __struct = Self::default();
10808        __struct.sequence = buf.get_u16_le();
10809        let tmp = buf.get_u8();
10810        __struct.flags =
10811            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10812                enum_type: "MavEventCurrentSequenceFlags",
10813                value: tmp as u32,
10814            })?;
10815        Ok(__struct)
10816    }
10817    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10818        let mut __tmp = BytesMut::new(bytes);
10819        #[allow(clippy::absurd_extreme_comparisons)]
10820        #[allow(unused_comparisons)]
10821        if __tmp.remaining() < Self::ENCODED_LEN {
10822            panic!(
10823                "buffer is too small (need {} bytes, but got {})",
10824                Self::ENCODED_LEN,
10825                __tmp.remaining(),
10826            )
10827        }
10828        __tmp.put_u16_le(self.sequence);
10829        __tmp.put_u8(self.flags as u8);
10830        if matches!(version, MavlinkVersion::V2) {
10831            let len = __tmp.len();
10832            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10833        } else {
10834            __tmp.len()
10835        }
10836    }
10837}
10838#[doc = "Get the current mode.         This should be emitted on any mode change, and broadcast at low rate (nominally 0.5 Hz).         It may be requested using MAV_CMD_REQUEST_MESSAGE.         See <https://mavlink.io/en/services/standard_modes.html>."]
10839#[doc = ""]
10840#[doc = "ID: 436"]
10841#[derive(Debug, Clone, PartialEq)]
10842#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10843#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10844#[cfg_attr(feature = "ts", derive(TS))]
10845#[cfg_attr(feature = "ts", ts(export))]
10846pub struct CURRENT_MODE_DATA {
10847    #[doc = "A bitfield for use for autopilot-specific flags"]
10848    pub custom_mode: u32,
10849    #[doc = "The custom_mode of the mode that was last commanded by the user (for example, with MAV_CMD_DO_SET_STANDARD_MODE, MAV_CMD_DO_SET_MODE or via RC). This should usually be the same as custom_mode. It will be different if the vehicle is unable to enter the intended mode, or has left that mode due to a failsafe condition. 0 indicates the intended custom mode is unknown/not supplied"]
10850    pub intended_custom_mode: u32,
10851    #[doc = "Standard mode."]
10852    pub standard_mode: MavStandardMode,
10853}
10854impl CURRENT_MODE_DATA {
10855    pub const ENCODED_LEN: usize = 9usize;
10856    pub const DEFAULT: Self = Self {
10857        custom_mode: 0_u32,
10858        intended_custom_mode: 0_u32,
10859        standard_mode: MavStandardMode::DEFAULT,
10860    };
10861    #[cfg(feature = "arbitrary")]
10862    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10863        use arbitrary::{Arbitrary, Unstructured};
10864        let mut buf = [0u8; 1024];
10865        rng.fill_bytes(&mut buf);
10866        let mut unstructured = Unstructured::new(&buf);
10867        Self::arbitrary(&mut unstructured).unwrap_or_default()
10868    }
10869}
10870impl Default for CURRENT_MODE_DATA {
10871    fn default() -> Self {
10872        Self::DEFAULT.clone()
10873    }
10874}
10875impl MessageData for CURRENT_MODE_DATA {
10876    type Message = MavMessage;
10877    const ID: u32 = 436u32;
10878    const NAME: &'static str = "CURRENT_MODE";
10879    const EXTRA_CRC: u8 = 193u8;
10880    const ENCODED_LEN: usize = 9usize;
10881    fn deser(
10882        _version: MavlinkVersion,
10883        __input: &[u8],
10884    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10885        let avail_len = __input.len();
10886        let mut payload_buf = [0; Self::ENCODED_LEN];
10887        let mut buf = if avail_len < Self::ENCODED_LEN {
10888            payload_buf[0..avail_len].copy_from_slice(__input);
10889            Bytes::new(&payload_buf)
10890        } else {
10891            Bytes::new(__input)
10892        };
10893        let mut __struct = Self::default();
10894        __struct.custom_mode = buf.get_u32_le();
10895        __struct.intended_custom_mode = buf.get_u32_le();
10896        let tmp = buf.get_u8();
10897        __struct.standard_mode =
10898            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10899                enum_type: "MavStandardMode",
10900                value: tmp as u32,
10901            })?;
10902        Ok(__struct)
10903    }
10904    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10905        let mut __tmp = BytesMut::new(bytes);
10906        #[allow(clippy::absurd_extreme_comparisons)]
10907        #[allow(unused_comparisons)]
10908        if __tmp.remaining() < Self::ENCODED_LEN {
10909            panic!(
10910                "buffer is too small (need {} bytes, but got {})",
10911                Self::ENCODED_LEN,
10912                __tmp.remaining(),
10913            )
10914        }
10915        __tmp.put_u32_le(self.custom_mode);
10916        __tmp.put_u32_le(self.intended_custom_mode);
10917        __tmp.put_u8(self.standard_mode as u8);
10918        if matches!(version, MavlinkVersion::V2) {
10919            let len = __tmp.len();
10920            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10921        } else {
10922            __tmp.len()
10923        }
10924    }
10925}
10926#[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-08)"]
10927#[doc = "Data stream status information."]
10928#[doc = ""]
10929#[doc = "ID: 67"]
10930#[derive(Debug, Clone, PartialEq)]
10931#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10932#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10933#[cfg_attr(feature = "ts", derive(TS))]
10934#[cfg_attr(feature = "ts", ts(export))]
10935pub struct DATA_STREAM_DATA {
10936    #[doc = "The message rate"]
10937    pub message_rate: u16,
10938    #[doc = "The ID of the requested data stream"]
10939    pub stream_id: u8,
10940    #[doc = "1 stream is enabled, 0 stream is stopped."]
10941    pub on_off: u8,
10942}
10943impl DATA_STREAM_DATA {
10944    pub const ENCODED_LEN: usize = 4usize;
10945    pub const DEFAULT: Self = Self {
10946        message_rate: 0_u16,
10947        stream_id: 0_u8,
10948        on_off: 0_u8,
10949    };
10950    #[cfg(feature = "arbitrary")]
10951    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10952        use arbitrary::{Arbitrary, Unstructured};
10953        let mut buf = [0u8; 1024];
10954        rng.fill_bytes(&mut buf);
10955        let mut unstructured = Unstructured::new(&buf);
10956        Self::arbitrary(&mut unstructured).unwrap_or_default()
10957    }
10958}
10959impl Default for DATA_STREAM_DATA {
10960    fn default() -> Self {
10961        Self::DEFAULT.clone()
10962    }
10963}
10964impl MessageData for DATA_STREAM_DATA {
10965    type Message = MavMessage;
10966    const ID: u32 = 67u32;
10967    const NAME: &'static str = "DATA_STREAM";
10968    const EXTRA_CRC: u8 = 21u8;
10969    const ENCODED_LEN: usize = 4usize;
10970    fn deser(
10971        _version: MavlinkVersion,
10972        __input: &[u8],
10973    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10974        let avail_len = __input.len();
10975        let mut payload_buf = [0; Self::ENCODED_LEN];
10976        let mut buf = if avail_len < Self::ENCODED_LEN {
10977            payload_buf[0..avail_len].copy_from_slice(__input);
10978            Bytes::new(&payload_buf)
10979        } else {
10980            Bytes::new(__input)
10981        };
10982        let mut __struct = Self::default();
10983        __struct.message_rate = buf.get_u16_le();
10984        __struct.stream_id = buf.get_u8();
10985        __struct.on_off = buf.get_u8();
10986        Ok(__struct)
10987    }
10988    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10989        let mut __tmp = BytesMut::new(bytes);
10990        #[allow(clippy::absurd_extreme_comparisons)]
10991        #[allow(unused_comparisons)]
10992        if __tmp.remaining() < Self::ENCODED_LEN {
10993            panic!(
10994                "buffer is too small (need {} bytes, but got {})",
10995                Self::ENCODED_LEN,
10996                __tmp.remaining(),
10997            )
10998        }
10999        __tmp.put_u16_le(self.message_rate);
11000        __tmp.put_u8(self.stream_id);
11001        __tmp.put_u8(self.on_off);
11002        if matches!(version, MavlinkVersion::V2) {
11003            let len = __tmp.len();
11004            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11005        } else {
11006            __tmp.len()
11007        }
11008    }
11009}
11010#[doc = "Handshake message to initiate, control and stop image streaming when using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
11011#[doc = ""]
11012#[doc = "ID: 130"]
11013#[derive(Debug, Clone, PartialEq)]
11014#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11015#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11016#[cfg_attr(feature = "ts", derive(TS))]
11017#[cfg_attr(feature = "ts", ts(export))]
11018pub struct DATA_TRANSMISSION_HANDSHAKE_DATA {
11019    #[doc = "total data size (set on ACK only)."]
11020    pub size: u32,
11021    #[doc = "Width of a matrix or image."]
11022    pub width: u16,
11023    #[doc = "Height of a matrix or image."]
11024    pub height: u16,
11025    #[doc = "Number of packets being sent (set on ACK only)."]
11026    pub packets: u16,
11027    #[doc = "Type of requested/acknowledged data."]
11028    pub mavtype: MavlinkDataStreamType,
11029    #[doc = "Payload size per packet (normally 253 byte, see DATA field size in message ENCAPSULATED_DATA) (set on ACK only)."]
11030    pub payload: u8,
11031    #[doc = "JPEG quality. Values: [1-100]."]
11032    pub jpg_quality: u8,
11033}
11034impl DATA_TRANSMISSION_HANDSHAKE_DATA {
11035    pub const ENCODED_LEN: usize = 13usize;
11036    pub const DEFAULT: Self = Self {
11037        size: 0_u32,
11038        width: 0_u16,
11039        height: 0_u16,
11040        packets: 0_u16,
11041        mavtype: MavlinkDataStreamType::DEFAULT,
11042        payload: 0_u8,
11043        jpg_quality: 0_u8,
11044    };
11045    #[cfg(feature = "arbitrary")]
11046    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11047        use arbitrary::{Arbitrary, Unstructured};
11048        let mut buf = [0u8; 1024];
11049        rng.fill_bytes(&mut buf);
11050        let mut unstructured = Unstructured::new(&buf);
11051        Self::arbitrary(&mut unstructured).unwrap_or_default()
11052    }
11053}
11054impl Default for DATA_TRANSMISSION_HANDSHAKE_DATA {
11055    fn default() -> Self {
11056        Self::DEFAULT.clone()
11057    }
11058}
11059impl MessageData for DATA_TRANSMISSION_HANDSHAKE_DATA {
11060    type Message = MavMessage;
11061    const ID: u32 = 130u32;
11062    const NAME: &'static str = "DATA_TRANSMISSION_HANDSHAKE";
11063    const EXTRA_CRC: u8 = 29u8;
11064    const ENCODED_LEN: usize = 13usize;
11065    fn deser(
11066        _version: MavlinkVersion,
11067        __input: &[u8],
11068    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11069        let avail_len = __input.len();
11070        let mut payload_buf = [0; Self::ENCODED_LEN];
11071        let mut buf = if avail_len < Self::ENCODED_LEN {
11072            payload_buf[0..avail_len].copy_from_slice(__input);
11073            Bytes::new(&payload_buf)
11074        } else {
11075            Bytes::new(__input)
11076        };
11077        let mut __struct = Self::default();
11078        __struct.size = buf.get_u32_le();
11079        __struct.width = buf.get_u16_le();
11080        __struct.height = buf.get_u16_le();
11081        __struct.packets = buf.get_u16_le();
11082        let tmp = buf.get_u8();
11083        __struct.mavtype =
11084            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11085                enum_type: "MavlinkDataStreamType",
11086                value: tmp as u32,
11087            })?;
11088        __struct.payload = buf.get_u8();
11089        __struct.jpg_quality = buf.get_u8();
11090        Ok(__struct)
11091    }
11092    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11093        let mut __tmp = BytesMut::new(bytes);
11094        #[allow(clippy::absurd_extreme_comparisons)]
11095        #[allow(unused_comparisons)]
11096        if __tmp.remaining() < Self::ENCODED_LEN {
11097            panic!(
11098                "buffer is too small (need {} bytes, but got {})",
11099                Self::ENCODED_LEN,
11100                __tmp.remaining(),
11101            )
11102        }
11103        __tmp.put_u32_le(self.size);
11104        __tmp.put_u16_le(self.width);
11105        __tmp.put_u16_le(self.height);
11106        __tmp.put_u16_le(self.packets);
11107        __tmp.put_u8(self.mavtype as u8);
11108        __tmp.put_u8(self.payload);
11109        __tmp.put_u8(self.jpg_quality);
11110        if matches!(version, MavlinkVersion::V2) {
11111            let len = __tmp.len();
11112            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11113        } else {
11114            __tmp.len()
11115        }
11116    }
11117}
11118#[doc = "Send a debug value. The index is used to discriminate between values. These values show up in the plot of QGroundControl as DEBUG N."]
11119#[doc = ""]
11120#[doc = "ID: 254"]
11121#[derive(Debug, Clone, PartialEq)]
11122#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11123#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11124#[cfg_attr(feature = "ts", derive(TS))]
11125#[cfg_attr(feature = "ts", ts(export))]
11126pub struct DEBUG_DATA {
11127    #[doc = "Timestamp (time since system boot)."]
11128    pub time_boot_ms: u32,
11129    #[doc = "DEBUG value"]
11130    pub value: f32,
11131    #[doc = "index of debug variable"]
11132    pub ind: u8,
11133}
11134impl DEBUG_DATA {
11135    pub const ENCODED_LEN: usize = 9usize;
11136    pub const DEFAULT: Self = Self {
11137        time_boot_ms: 0_u32,
11138        value: 0.0_f32,
11139        ind: 0_u8,
11140    };
11141    #[cfg(feature = "arbitrary")]
11142    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11143        use arbitrary::{Arbitrary, Unstructured};
11144        let mut buf = [0u8; 1024];
11145        rng.fill_bytes(&mut buf);
11146        let mut unstructured = Unstructured::new(&buf);
11147        Self::arbitrary(&mut unstructured).unwrap_or_default()
11148    }
11149}
11150impl Default for DEBUG_DATA {
11151    fn default() -> Self {
11152        Self::DEFAULT.clone()
11153    }
11154}
11155impl MessageData for DEBUG_DATA {
11156    type Message = MavMessage;
11157    const ID: u32 = 254u32;
11158    const NAME: &'static str = "DEBUG";
11159    const EXTRA_CRC: u8 = 46u8;
11160    const ENCODED_LEN: usize = 9usize;
11161    fn deser(
11162        _version: MavlinkVersion,
11163        __input: &[u8],
11164    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11165        let avail_len = __input.len();
11166        let mut payload_buf = [0; Self::ENCODED_LEN];
11167        let mut buf = if avail_len < Self::ENCODED_LEN {
11168            payload_buf[0..avail_len].copy_from_slice(__input);
11169            Bytes::new(&payload_buf)
11170        } else {
11171            Bytes::new(__input)
11172        };
11173        let mut __struct = Self::default();
11174        __struct.time_boot_ms = buf.get_u32_le();
11175        __struct.value = buf.get_f32_le();
11176        __struct.ind = buf.get_u8();
11177        Ok(__struct)
11178    }
11179    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11180        let mut __tmp = BytesMut::new(bytes);
11181        #[allow(clippy::absurd_extreme_comparisons)]
11182        #[allow(unused_comparisons)]
11183        if __tmp.remaining() < Self::ENCODED_LEN {
11184            panic!(
11185                "buffer is too small (need {} bytes, but got {})",
11186                Self::ENCODED_LEN,
11187                __tmp.remaining(),
11188            )
11189        }
11190        __tmp.put_u32_le(self.time_boot_ms);
11191        __tmp.put_f32_le(self.value);
11192        __tmp.put_u8(self.ind);
11193        if matches!(version, MavlinkVersion::V2) {
11194            let len = __tmp.len();
11195            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11196        } else {
11197            __tmp.len()
11198        }
11199    }
11200}
11201#[doc = "Large debug/prototyping array. The message uses the maximum available payload for data. The array_id and name fields are used to discriminate between messages in code and in user interfaces (respectively). Do not use in production code."]
11202#[doc = ""]
11203#[doc = "ID: 350"]
11204#[derive(Debug, Clone, PartialEq)]
11205#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11206#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11207#[cfg_attr(feature = "ts", derive(TS))]
11208#[cfg_attr(feature = "ts", ts(export))]
11209pub struct DEBUG_FLOAT_ARRAY_DATA {
11210    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
11211    pub time_usec: u64,
11212    #[doc = "Unique ID used to discriminate between arrays"]
11213    pub array_id: u16,
11214    #[doc = "Name, for human-friendly display in a Ground Control Station"]
11215    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11216    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11217    pub name: [u8; 10],
11218    #[doc = "data"]
11219    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11220    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11221    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11222    pub data: [f32; 58],
11223}
11224impl DEBUG_FLOAT_ARRAY_DATA {
11225    pub const ENCODED_LEN: usize = 252usize;
11226    pub const DEFAULT: Self = Self {
11227        time_usec: 0_u64,
11228        array_id: 0_u16,
11229        name: [0_u8; 10usize],
11230        data: [0.0_f32; 58usize],
11231    };
11232    #[cfg(feature = "arbitrary")]
11233    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11234        use arbitrary::{Arbitrary, Unstructured};
11235        let mut buf = [0u8; 1024];
11236        rng.fill_bytes(&mut buf);
11237        let mut unstructured = Unstructured::new(&buf);
11238        Self::arbitrary(&mut unstructured).unwrap_or_default()
11239    }
11240}
11241impl Default for DEBUG_FLOAT_ARRAY_DATA {
11242    fn default() -> Self {
11243        Self::DEFAULT.clone()
11244    }
11245}
11246impl MessageData for DEBUG_FLOAT_ARRAY_DATA {
11247    type Message = MavMessage;
11248    const ID: u32 = 350u32;
11249    const NAME: &'static str = "DEBUG_FLOAT_ARRAY";
11250    const EXTRA_CRC: u8 = 232u8;
11251    const ENCODED_LEN: usize = 252usize;
11252    fn deser(
11253        _version: MavlinkVersion,
11254        __input: &[u8],
11255    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11256        let avail_len = __input.len();
11257        let mut payload_buf = [0; Self::ENCODED_LEN];
11258        let mut buf = if avail_len < Self::ENCODED_LEN {
11259            payload_buf[0..avail_len].copy_from_slice(__input);
11260            Bytes::new(&payload_buf)
11261        } else {
11262            Bytes::new(__input)
11263        };
11264        let mut __struct = Self::default();
11265        __struct.time_usec = buf.get_u64_le();
11266        __struct.array_id = buf.get_u16_le();
11267        for v in &mut __struct.name {
11268            let val = buf.get_u8();
11269            *v = val;
11270        }
11271        for v in &mut __struct.data {
11272            let val = buf.get_f32_le();
11273            *v = val;
11274        }
11275        Ok(__struct)
11276    }
11277    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11278        let mut __tmp = BytesMut::new(bytes);
11279        #[allow(clippy::absurd_extreme_comparisons)]
11280        #[allow(unused_comparisons)]
11281        if __tmp.remaining() < Self::ENCODED_LEN {
11282            panic!(
11283                "buffer is too small (need {} bytes, but got {})",
11284                Self::ENCODED_LEN,
11285                __tmp.remaining(),
11286            )
11287        }
11288        __tmp.put_u64_le(self.time_usec);
11289        __tmp.put_u16_le(self.array_id);
11290        for val in &self.name {
11291            __tmp.put_u8(*val);
11292        }
11293        if matches!(version, MavlinkVersion::V2) {
11294            for val in &self.data {
11295                __tmp.put_f32_le(*val);
11296            }
11297            let len = __tmp.len();
11298            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11299        } else {
11300            __tmp.len()
11301        }
11302    }
11303}
11304#[doc = "To debug something using a named 3D vector."]
11305#[doc = ""]
11306#[doc = "ID: 250"]
11307#[derive(Debug, Clone, PartialEq)]
11308#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11309#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11310#[cfg_attr(feature = "ts", derive(TS))]
11311#[cfg_attr(feature = "ts", ts(export))]
11312pub struct DEBUG_VECT_DATA {
11313    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
11314    pub time_usec: u64,
11315    #[doc = "x"]
11316    pub x: f32,
11317    #[doc = "y"]
11318    pub y: f32,
11319    #[doc = "z"]
11320    pub z: f32,
11321    #[doc = "Name"]
11322    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11323    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11324    pub name: [u8; 10],
11325}
11326impl DEBUG_VECT_DATA {
11327    pub const ENCODED_LEN: usize = 30usize;
11328    pub const DEFAULT: Self = Self {
11329        time_usec: 0_u64,
11330        x: 0.0_f32,
11331        y: 0.0_f32,
11332        z: 0.0_f32,
11333        name: [0_u8; 10usize],
11334    };
11335    #[cfg(feature = "arbitrary")]
11336    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11337        use arbitrary::{Arbitrary, Unstructured};
11338        let mut buf = [0u8; 1024];
11339        rng.fill_bytes(&mut buf);
11340        let mut unstructured = Unstructured::new(&buf);
11341        Self::arbitrary(&mut unstructured).unwrap_or_default()
11342    }
11343}
11344impl Default for DEBUG_VECT_DATA {
11345    fn default() -> Self {
11346        Self::DEFAULT.clone()
11347    }
11348}
11349impl MessageData for DEBUG_VECT_DATA {
11350    type Message = MavMessage;
11351    const ID: u32 = 250u32;
11352    const NAME: &'static str = "DEBUG_VECT";
11353    const EXTRA_CRC: u8 = 49u8;
11354    const ENCODED_LEN: usize = 30usize;
11355    fn deser(
11356        _version: MavlinkVersion,
11357        __input: &[u8],
11358    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11359        let avail_len = __input.len();
11360        let mut payload_buf = [0; Self::ENCODED_LEN];
11361        let mut buf = if avail_len < Self::ENCODED_LEN {
11362            payload_buf[0..avail_len].copy_from_slice(__input);
11363            Bytes::new(&payload_buf)
11364        } else {
11365            Bytes::new(__input)
11366        };
11367        let mut __struct = Self::default();
11368        __struct.time_usec = buf.get_u64_le();
11369        __struct.x = buf.get_f32_le();
11370        __struct.y = buf.get_f32_le();
11371        __struct.z = buf.get_f32_le();
11372        for v in &mut __struct.name {
11373            let val = buf.get_u8();
11374            *v = val;
11375        }
11376        Ok(__struct)
11377    }
11378    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11379        let mut __tmp = BytesMut::new(bytes);
11380        #[allow(clippy::absurd_extreme_comparisons)]
11381        #[allow(unused_comparisons)]
11382        if __tmp.remaining() < Self::ENCODED_LEN {
11383            panic!(
11384                "buffer is too small (need {} bytes, but got {})",
11385                Self::ENCODED_LEN,
11386                __tmp.remaining(),
11387            )
11388        }
11389        __tmp.put_u64_le(self.time_usec);
11390        __tmp.put_f32_le(self.x);
11391        __tmp.put_f32_le(self.y);
11392        __tmp.put_f32_le(self.z);
11393        for val in &self.name {
11394            __tmp.put_u8(*val);
11395        }
11396        if matches!(version, MavlinkVersion::V2) {
11397            let len = __tmp.len();
11398            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11399        } else {
11400            __tmp.len()
11401        }
11402    }
11403}
11404#[doc = "Distance sensor information for an onboard rangefinder."]
11405#[doc = ""]
11406#[doc = "ID: 132"]
11407#[derive(Debug, Clone, PartialEq)]
11408#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11409#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11410#[cfg_attr(feature = "ts", derive(TS))]
11411#[cfg_attr(feature = "ts", ts(export))]
11412pub struct DISTANCE_SENSOR_DATA {
11413    #[doc = "Timestamp (time since system boot)."]
11414    pub time_boot_ms: u32,
11415    #[doc = "Minimum distance the sensor can measure"]
11416    pub min_distance: u16,
11417    #[doc = "Maximum distance the sensor can measure"]
11418    pub max_distance: u16,
11419    #[doc = "Current distance reading"]
11420    pub current_distance: u16,
11421    #[doc = "Type of distance sensor."]
11422    pub mavtype: MavDistanceSensor,
11423    #[doc = "Onboard ID of the sensor"]
11424    pub id: u8,
11425    #[doc = "Direction the sensor faces. downward-facing: ROTATION_PITCH_270, upward-facing: ROTATION_PITCH_90, backward-facing: ROTATION_PITCH_180, forward-facing: ROTATION_NONE, left-facing: ROTATION_YAW_90, right-facing: ROTATION_YAW_270"]
11426    pub orientation: MavSensorOrientation,
11427    #[doc = "Measurement variance. Max standard deviation is 6cm. UINT8_MAX if unknown."]
11428    pub covariance: u8,
11429    #[doc = "Horizontal Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0."]
11430    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11431    pub horizontal_fov: f32,
11432    #[doc = "Vertical Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0."]
11433    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11434    pub vertical_fov: f32,
11435    #[doc = "Quaternion of the sensor orientation in vehicle body frame (w, x, y, z order, zero-rotation is 1, 0, 0, 0). Zero-rotation is along the vehicle body x-axis. This field is required if the orientation is set to MAV_SENSOR_ROTATION_CUSTOM. Set it to 0 if invalid.\""]
11436    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11437    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11438    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11439    pub quaternion: [f32; 4],
11440    #[doc = "Signal quality of the sensor. Specific to each sensor type, representing the relation of the signal strength with the target reflectivity, distance, size or aspect, but normalised as a percentage. 0 = unknown/unset signal quality, 1 = invalid signal, 100 = perfect signal."]
11441    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11442    pub signal_quality: u8,
11443}
11444impl DISTANCE_SENSOR_DATA {
11445    pub const ENCODED_LEN: usize = 39usize;
11446    pub const DEFAULT: Self = Self {
11447        time_boot_ms: 0_u32,
11448        min_distance: 0_u16,
11449        max_distance: 0_u16,
11450        current_distance: 0_u16,
11451        mavtype: MavDistanceSensor::DEFAULT,
11452        id: 0_u8,
11453        orientation: MavSensorOrientation::DEFAULT,
11454        covariance: 0_u8,
11455        horizontal_fov: 0.0_f32,
11456        vertical_fov: 0.0_f32,
11457        quaternion: [0.0_f32; 4usize],
11458        signal_quality: 0_u8,
11459    };
11460    #[cfg(feature = "arbitrary")]
11461    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11462        use arbitrary::{Arbitrary, Unstructured};
11463        let mut buf = [0u8; 1024];
11464        rng.fill_bytes(&mut buf);
11465        let mut unstructured = Unstructured::new(&buf);
11466        Self::arbitrary(&mut unstructured).unwrap_or_default()
11467    }
11468}
11469impl Default for DISTANCE_SENSOR_DATA {
11470    fn default() -> Self {
11471        Self::DEFAULT.clone()
11472    }
11473}
11474impl MessageData for DISTANCE_SENSOR_DATA {
11475    type Message = MavMessage;
11476    const ID: u32 = 132u32;
11477    const NAME: &'static str = "DISTANCE_SENSOR";
11478    const EXTRA_CRC: u8 = 85u8;
11479    const ENCODED_LEN: usize = 39usize;
11480    fn deser(
11481        _version: MavlinkVersion,
11482        __input: &[u8],
11483    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11484        let avail_len = __input.len();
11485        let mut payload_buf = [0; Self::ENCODED_LEN];
11486        let mut buf = if avail_len < Self::ENCODED_LEN {
11487            payload_buf[0..avail_len].copy_from_slice(__input);
11488            Bytes::new(&payload_buf)
11489        } else {
11490            Bytes::new(__input)
11491        };
11492        let mut __struct = Self::default();
11493        __struct.time_boot_ms = buf.get_u32_le();
11494        __struct.min_distance = buf.get_u16_le();
11495        __struct.max_distance = buf.get_u16_le();
11496        __struct.current_distance = buf.get_u16_le();
11497        let tmp = buf.get_u8();
11498        __struct.mavtype =
11499            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11500                enum_type: "MavDistanceSensor",
11501                value: tmp as u32,
11502            })?;
11503        __struct.id = buf.get_u8();
11504        let tmp = buf.get_u8();
11505        __struct.orientation =
11506            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11507                enum_type: "MavSensorOrientation",
11508                value: tmp as u32,
11509            })?;
11510        __struct.covariance = buf.get_u8();
11511        __struct.horizontal_fov = buf.get_f32_le();
11512        __struct.vertical_fov = buf.get_f32_le();
11513        for v in &mut __struct.quaternion {
11514            let val = buf.get_f32_le();
11515            *v = val;
11516        }
11517        __struct.signal_quality = buf.get_u8();
11518        Ok(__struct)
11519    }
11520    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11521        let mut __tmp = BytesMut::new(bytes);
11522        #[allow(clippy::absurd_extreme_comparisons)]
11523        #[allow(unused_comparisons)]
11524        if __tmp.remaining() < Self::ENCODED_LEN {
11525            panic!(
11526                "buffer is too small (need {} bytes, but got {})",
11527                Self::ENCODED_LEN,
11528                __tmp.remaining(),
11529            )
11530        }
11531        __tmp.put_u32_le(self.time_boot_ms);
11532        __tmp.put_u16_le(self.min_distance);
11533        __tmp.put_u16_le(self.max_distance);
11534        __tmp.put_u16_le(self.current_distance);
11535        __tmp.put_u8(self.mavtype as u8);
11536        __tmp.put_u8(self.id);
11537        __tmp.put_u8(self.orientation as u8);
11538        __tmp.put_u8(self.covariance);
11539        if matches!(version, MavlinkVersion::V2) {
11540            __tmp.put_f32_le(self.horizontal_fov);
11541            __tmp.put_f32_le(self.vertical_fov);
11542            for val in &self.quaternion {
11543                __tmp.put_f32_le(*val);
11544            }
11545            __tmp.put_u8(self.signal_quality);
11546            let len = __tmp.len();
11547            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11548        } else {
11549            __tmp.len()
11550        }
11551    }
11552}
11553#[doc = "EFI status output."]
11554#[doc = ""]
11555#[doc = "ID: 225"]
11556#[derive(Debug, Clone, PartialEq)]
11557#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11558#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11559#[cfg_attr(feature = "ts", derive(TS))]
11560#[cfg_attr(feature = "ts", ts(export))]
11561pub struct EFI_STATUS_DATA {
11562    #[doc = "ECU index"]
11563    pub ecu_index: f32,
11564    #[doc = "RPM"]
11565    pub rpm: f32,
11566    #[doc = "Fuel consumed"]
11567    pub fuel_consumed: f32,
11568    #[doc = "Fuel flow rate"]
11569    pub fuel_flow: f32,
11570    #[doc = "Engine load"]
11571    pub engine_load: f32,
11572    #[doc = "Throttle position"]
11573    pub throttle_position: f32,
11574    #[doc = "Spark dwell time"]
11575    pub spark_dwell_time: f32,
11576    #[doc = "Barometric pressure"]
11577    pub barometric_pressure: f32,
11578    #[doc = "Intake manifold pressure("]
11579    pub intake_manifold_pressure: f32,
11580    #[doc = "Intake manifold temperature"]
11581    pub intake_manifold_temperature: f32,
11582    #[doc = "Cylinder head temperature"]
11583    pub cylinder_head_temperature: f32,
11584    #[doc = "Ignition timing (Crank angle degrees)"]
11585    pub ignition_timing: f32,
11586    #[doc = "Injection time"]
11587    pub injection_time: f32,
11588    #[doc = "Exhaust gas temperature"]
11589    pub exhaust_gas_temperature: f32,
11590    #[doc = "Output throttle"]
11591    pub throttle_out: f32,
11592    #[doc = "Pressure/temperature compensation"]
11593    pub pt_compensation: f32,
11594    #[doc = "EFI health status"]
11595    pub health: u8,
11596    #[doc = "Supply voltage to EFI sparking system.  Zero in this value means \"unknown\", so if the supply voltage really is zero volts use 0.0001 instead."]
11597    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11598    pub ignition_voltage: f32,
11599    #[doc = "Fuel pressure. Zero in this value means \"unknown\", so if the fuel pressure really is zero kPa use 0.0001 instead."]
11600    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11601    pub fuel_pressure: f32,
11602}
11603impl EFI_STATUS_DATA {
11604    pub const ENCODED_LEN: usize = 73usize;
11605    pub const DEFAULT: Self = Self {
11606        ecu_index: 0.0_f32,
11607        rpm: 0.0_f32,
11608        fuel_consumed: 0.0_f32,
11609        fuel_flow: 0.0_f32,
11610        engine_load: 0.0_f32,
11611        throttle_position: 0.0_f32,
11612        spark_dwell_time: 0.0_f32,
11613        barometric_pressure: 0.0_f32,
11614        intake_manifold_pressure: 0.0_f32,
11615        intake_manifold_temperature: 0.0_f32,
11616        cylinder_head_temperature: 0.0_f32,
11617        ignition_timing: 0.0_f32,
11618        injection_time: 0.0_f32,
11619        exhaust_gas_temperature: 0.0_f32,
11620        throttle_out: 0.0_f32,
11621        pt_compensation: 0.0_f32,
11622        health: 0_u8,
11623        ignition_voltage: 0.0_f32,
11624        fuel_pressure: 0.0_f32,
11625    };
11626    #[cfg(feature = "arbitrary")]
11627    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11628        use arbitrary::{Arbitrary, Unstructured};
11629        let mut buf = [0u8; 1024];
11630        rng.fill_bytes(&mut buf);
11631        let mut unstructured = Unstructured::new(&buf);
11632        Self::arbitrary(&mut unstructured).unwrap_or_default()
11633    }
11634}
11635impl Default for EFI_STATUS_DATA {
11636    fn default() -> Self {
11637        Self::DEFAULT.clone()
11638    }
11639}
11640impl MessageData for EFI_STATUS_DATA {
11641    type Message = MavMessage;
11642    const ID: u32 = 225u32;
11643    const NAME: &'static str = "EFI_STATUS";
11644    const EXTRA_CRC: u8 = 208u8;
11645    const ENCODED_LEN: usize = 73usize;
11646    fn deser(
11647        _version: MavlinkVersion,
11648        __input: &[u8],
11649    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11650        let avail_len = __input.len();
11651        let mut payload_buf = [0; Self::ENCODED_LEN];
11652        let mut buf = if avail_len < Self::ENCODED_LEN {
11653            payload_buf[0..avail_len].copy_from_slice(__input);
11654            Bytes::new(&payload_buf)
11655        } else {
11656            Bytes::new(__input)
11657        };
11658        let mut __struct = Self::default();
11659        __struct.ecu_index = buf.get_f32_le();
11660        __struct.rpm = buf.get_f32_le();
11661        __struct.fuel_consumed = buf.get_f32_le();
11662        __struct.fuel_flow = buf.get_f32_le();
11663        __struct.engine_load = buf.get_f32_le();
11664        __struct.throttle_position = buf.get_f32_le();
11665        __struct.spark_dwell_time = buf.get_f32_le();
11666        __struct.barometric_pressure = buf.get_f32_le();
11667        __struct.intake_manifold_pressure = buf.get_f32_le();
11668        __struct.intake_manifold_temperature = buf.get_f32_le();
11669        __struct.cylinder_head_temperature = buf.get_f32_le();
11670        __struct.ignition_timing = buf.get_f32_le();
11671        __struct.injection_time = buf.get_f32_le();
11672        __struct.exhaust_gas_temperature = buf.get_f32_le();
11673        __struct.throttle_out = buf.get_f32_le();
11674        __struct.pt_compensation = buf.get_f32_le();
11675        __struct.health = buf.get_u8();
11676        __struct.ignition_voltage = buf.get_f32_le();
11677        __struct.fuel_pressure = buf.get_f32_le();
11678        Ok(__struct)
11679    }
11680    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11681        let mut __tmp = BytesMut::new(bytes);
11682        #[allow(clippy::absurd_extreme_comparisons)]
11683        #[allow(unused_comparisons)]
11684        if __tmp.remaining() < Self::ENCODED_LEN {
11685            panic!(
11686                "buffer is too small (need {} bytes, but got {})",
11687                Self::ENCODED_LEN,
11688                __tmp.remaining(),
11689            )
11690        }
11691        __tmp.put_f32_le(self.ecu_index);
11692        __tmp.put_f32_le(self.rpm);
11693        __tmp.put_f32_le(self.fuel_consumed);
11694        __tmp.put_f32_le(self.fuel_flow);
11695        __tmp.put_f32_le(self.engine_load);
11696        __tmp.put_f32_le(self.throttle_position);
11697        __tmp.put_f32_le(self.spark_dwell_time);
11698        __tmp.put_f32_le(self.barometric_pressure);
11699        __tmp.put_f32_le(self.intake_manifold_pressure);
11700        __tmp.put_f32_le(self.intake_manifold_temperature);
11701        __tmp.put_f32_le(self.cylinder_head_temperature);
11702        __tmp.put_f32_le(self.ignition_timing);
11703        __tmp.put_f32_le(self.injection_time);
11704        __tmp.put_f32_le(self.exhaust_gas_temperature);
11705        __tmp.put_f32_le(self.throttle_out);
11706        __tmp.put_f32_le(self.pt_compensation);
11707        __tmp.put_u8(self.health);
11708        if matches!(version, MavlinkVersion::V2) {
11709            __tmp.put_f32_le(self.ignition_voltage);
11710            __tmp.put_f32_le(self.fuel_pressure);
11711            let len = __tmp.len();
11712            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11713        } else {
11714            __tmp.len()
11715        }
11716    }
11717}
11718#[doc = "Extended EKF state estimates for ASLUAVs."]
11719#[doc = ""]
11720#[doc = "ID: 8007"]
11721#[derive(Debug, Clone, PartialEq)]
11722#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11723#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11724#[cfg_attr(feature = "ts", derive(TS))]
11725#[cfg_attr(feature = "ts", ts(export))]
11726pub struct EKF_EXT_DATA {
11727    #[doc = "Time since system start"]
11728    pub timestamp: u64,
11729    #[doc = "Magnitude of wind velocity (in lateral inertial plane)"]
11730    pub Windspeed: f32,
11731    #[doc = "Wind heading angle from North"]
11732    pub WindDir: f32,
11733    #[doc = "Z (Down) component of inertial wind velocity"]
11734    pub WindZ: f32,
11735    #[doc = "Magnitude of air velocity"]
11736    pub Airspeed: f32,
11737    #[doc = "Sideslip angle"]
11738    pub beta: f32,
11739    #[doc = "Angle of attack"]
11740    pub alpha: f32,
11741}
11742impl EKF_EXT_DATA {
11743    pub const ENCODED_LEN: usize = 32usize;
11744    pub const DEFAULT: Self = Self {
11745        timestamp: 0_u64,
11746        Windspeed: 0.0_f32,
11747        WindDir: 0.0_f32,
11748        WindZ: 0.0_f32,
11749        Airspeed: 0.0_f32,
11750        beta: 0.0_f32,
11751        alpha: 0.0_f32,
11752    };
11753    #[cfg(feature = "arbitrary")]
11754    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11755        use arbitrary::{Arbitrary, Unstructured};
11756        let mut buf = [0u8; 1024];
11757        rng.fill_bytes(&mut buf);
11758        let mut unstructured = Unstructured::new(&buf);
11759        Self::arbitrary(&mut unstructured).unwrap_or_default()
11760    }
11761}
11762impl Default for EKF_EXT_DATA {
11763    fn default() -> Self {
11764        Self::DEFAULT.clone()
11765    }
11766}
11767impl MessageData for EKF_EXT_DATA {
11768    type Message = MavMessage;
11769    const ID: u32 = 8007u32;
11770    const NAME: &'static str = "EKF_EXT";
11771    const EXTRA_CRC: u8 = 64u8;
11772    const ENCODED_LEN: usize = 32usize;
11773    fn deser(
11774        _version: MavlinkVersion,
11775        __input: &[u8],
11776    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11777        let avail_len = __input.len();
11778        let mut payload_buf = [0; Self::ENCODED_LEN];
11779        let mut buf = if avail_len < Self::ENCODED_LEN {
11780            payload_buf[0..avail_len].copy_from_slice(__input);
11781            Bytes::new(&payload_buf)
11782        } else {
11783            Bytes::new(__input)
11784        };
11785        let mut __struct = Self::default();
11786        __struct.timestamp = buf.get_u64_le();
11787        __struct.Windspeed = buf.get_f32_le();
11788        __struct.WindDir = buf.get_f32_le();
11789        __struct.WindZ = buf.get_f32_le();
11790        __struct.Airspeed = buf.get_f32_le();
11791        __struct.beta = buf.get_f32_le();
11792        __struct.alpha = buf.get_f32_le();
11793        Ok(__struct)
11794    }
11795    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11796        let mut __tmp = BytesMut::new(bytes);
11797        #[allow(clippy::absurd_extreme_comparisons)]
11798        #[allow(unused_comparisons)]
11799        if __tmp.remaining() < Self::ENCODED_LEN {
11800            panic!(
11801                "buffer is too small (need {} bytes, but got {})",
11802                Self::ENCODED_LEN,
11803                __tmp.remaining(),
11804            )
11805        }
11806        __tmp.put_u64_le(self.timestamp);
11807        __tmp.put_f32_le(self.Windspeed);
11808        __tmp.put_f32_le(self.WindDir);
11809        __tmp.put_f32_le(self.WindZ);
11810        __tmp.put_f32_le(self.Airspeed);
11811        __tmp.put_f32_le(self.beta);
11812        __tmp.put_f32_le(self.alpha);
11813        if matches!(version, MavlinkVersion::V2) {
11814            let len = __tmp.len();
11815            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11816        } else {
11817            __tmp.len()
11818        }
11819    }
11820}
11821#[doc = "Data packet for images sent using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
11822#[doc = ""]
11823#[doc = "ID: 131"]
11824#[derive(Debug, Clone, PartialEq)]
11825#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11826#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11827#[cfg_attr(feature = "ts", derive(TS))]
11828#[cfg_attr(feature = "ts", ts(export))]
11829pub struct ENCAPSULATED_DATA_DATA {
11830    #[doc = "sequence number (starting with 0 on every transmission)"]
11831    pub seqnr: u16,
11832    #[doc = "image data bytes"]
11833    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11834    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11835    pub data: [u8; 253],
11836}
11837impl ENCAPSULATED_DATA_DATA {
11838    pub const ENCODED_LEN: usize = 255usize;
11839    pub const DEFAULT: Self = Self {
11840        seqnr: 0_u16,
11841        data: [0_u8; 253usize],
11842    };
11843    #[cfg(feature = "arbitrary")]
11844    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11845        use arbitrary::{Arbitrary, Unstructured};
11846        let mut buf = [0u8; 1024];
11847        rng.fill_bytes(&mut buf);
11848        let mut unstructured = Unstructured::new(&buf);
11849        Self::arbitrary(&mut unstructured).unwrap_or_default()
11850    }
11851}
11852impl Default for ENCAPSULATED_DATA_DATA {
11853    fn default() -> Self {
11854        Self::DEFAULT.clone()
11855    }
11856}
11857impl MessageData for ENCAPSULATED_DATA_DATA {
11858    type Message = MavMessage;
11859    const ID: u32 = 131u32;
11860    const NAME: &'static str = "ENCAPSULATED_DATA";
11861    const EXTRA_CRC: u8 = 223u8;
11862    const ENCODED_LEN: usize = 255usize;
11863    fn deser(
11864        _version: MavlinkVersion,
11865        __input: &[u8],
11866    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11867        let avail_len = __input.len();
11868        let mut payload_buf = [0; Self::ENCODED_LEN];
11869        let mut buf = if avail_len < Self::ENCODED_LEN {
11870            payload_buf[0..avail_len].copy_from_slice(__input);
11871            Bytes::new(&payload_buf)
11872        } else {
11873            Bytes::new(__input)
11874        };
11875        let mut __struct = Self::default();
11876        __struct.seqnr = buf.get_u16_le();
11877        for v in &mut __struct.data {
11878            let val = buf.get_u8();
11879            *v = val;
11880        }
11881        Ok(__struct)
11882    }
11883    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11884        let mut __tmp = BytesMut::new(bytes);
11885        #[allow(clippy::absurd_extreme_comparisons)]
11886        #[allow(unused_comparisons)]
11887        if __tmp.remaining() < Self::ENCODED_LEN {
11888            panic!(
11889                "buffer is too small (need {} bytes, but got {})",
11890                Self::ENCODED_LEN,
11891                __tmp.remaining(),
11892            )
11893        }
11894        __tmp.put_u16_le(self.seqnr);
11895        for val in &self.data {
11896            __tmp.put_u8(*val);
11897        }
11898        if matches!(version, MavlinkVersion::V2) {
11899            let len = __tmp.len();
11900            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11901        } else {
11902            __tmp.len()
11903        }
11904    }
11905}
11906#[doc = "ESC information for lower rate streaming. Recommended streaming rate 1Hz. See ESC_STATUS for higher-rate ESC data."]
11907#[doc = ""]
11908#[doc = "ID: 290"]
11909#[derive(Debug, Clone, PartialEq)]
11910#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11911#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11912#[cfg_attr(feature = "ts", derive(TS))]
11913#[cfg_attr(feature = "ts", ts(export))]
11914pub struct ESC_INFO_DATA {
11915    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number."]
11916    pub time_usec: u64,
11917    #[doc = "Number of reported errors by each ESC since boot."]
11918    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11919    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11920    pub error_count: [u32; 4],
11921    #[doc = "Counter of data packets received."]
11922    pub counter: u16,
11923    #[doc = "Bitmap of ESC failure flags."]
11924    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11925    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11926    pub failure_flags: [u16; 4],
11927    #[doc = "Temperature of each ESC. INT16_MAX: if data not supplied by ESC."]
11928    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11929    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11930    pub temperature: [i16; 4],
11931    #[doc = "Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4."]
11932    pub index: u8,
11933    #[doc = "Total number of ESCs in all messages of this type. Message fields with an index higher than this should be ignored because they contain invalid data."]
11934    pub count: u8,
11935    #[doc = "Connection type protocol for all ESC."]
11936    pub connection_type: EscConnectionType,
11937    #[doc = "Information regarding online/offline status of each ESC."]
11938    pub info: u8,
11939}
11940impl ESC_INFO_DATA {
11941    pub const ENCODED_LEN: usize = 46usize;
11942    pub const DEFAULT: Self = Self {
11943        time_usec: 0_u64,
11944        error_count: [0_u32; 4usize],
11945        counter: 0_u16,
11946        failure_flags: [0_u16; 4usize],
11947        temperature: [0_i16; 4usize],
11948        index: 0_u8,
11949        count: 0_u8,
11950        connection_type: EscConnectionType::DEFAULT,
11951        info: 0_u8,
11952    };
11953    #[cfg(feature = "arbitrary")]
11954    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11955        use arbitrary::{Arbitrary, Unstructured};
11956        let mut buf = [0u8; 1024];
11957        rng.fill_bytes(&mut buf);
11958        let mut unstructured = Unstructured::new(&buf);
11959        Self::arbitrary(&mut unstructured).unwrap_or_default()
11960    }
11961}
11962impl Default for ESC_INFO_DATA {
11963    fn default() -> Self {
11964        Self::DEFAULT.clone()
11965    }
11966}
11967impl MessageData for ESC_INFO_DATA {
11968    type Message = MavMessage;
11969    const ID: u32 = 290u32;
11970    const NAME: &'static str = "ESC_INFO";
11971    const EXTRA_CRC: u8 = 251u8;
11972    const ENCODED_LEN: usize = 46usize;
11973    fn deser(
11974        _version: MavlinkVersion,
11975        __input: &[u8],
11976    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11977        let avail_len = __input.len();
11978        let mut payload_buf = [0; Self::ENCODED_LEN];
11979        let mut buf = if avail_len < Self::ENCODED_LEN {
11980            payload_buf[0..avail_len].copy_from_slice(__input);
11981            Bytes::new(&payload_buf)
11982        } else {
11983            Bytes::new(__input)
11984        };
11985        let mut __struct = Self::default();
11986        __struct.time_usec = buf.get_u64_le();
11987        for v in &mut __struct.error_count {
11988            let val = buf.get_u32_le();
11989            *v = val;
11990        }
11991        __struct.counter = buf.get_u16_le();
11992        for v in &mut __struct.failure_flags {
11993            let val = buf.get_u16_le();
11994            *v = val;
11995        }
11996        for v in &mut __struct.temperature {
11997            let val = buf.get_i16_le();
11998            *v = val;
11999        }
12000        __struct.index = buf.get_u8();
12001        __struct.count = buf.get_u8();
12002        let tmp = buf.get_u8();
12003        __struct.connection_type =
12004            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12005                enum_type: "EscConnectionType",
12006                value: tmp as u32,
12007            })?;
12008        __struct.info = buf.get_u8();
12009        Ok(__struct)
12010    }
12011    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12012        let mut __tmp = BytesMut::new(bytes);
12013        #[allow(clippy::absurd_extreme_comparisons)]
12014        #[allow(unused_comparisons)]
12015        if __tmp.remaining() < Self::ENCODED_LEN {
12016            panic!(
12017                "buffer is too small (need {} bytes, but got {})",
12018                Self::ENCODED_LEN,
12019                __tmp.remaining(),
12020            )
12021        }
12022        __tmp.put_u64_le(self.time_usec);
12023        for val in &self.error_count {
12024            __tmp.put_u32_le(*val);
12025        }
12026        __tmp.put_u16_le(self.counter);
12027        for val in &self.failure_flags {
12028            __tmp.put_u16_le(*val);
12029        }
12030        for val in &self.temperature {
12031            __tmp.put_i16_le(*val);
12032        }
12033        __tmp.put_u8(self.index);
12034        __tmp.put_u8(self.count);
12035        __tmp.put_u8(self.connection_type as u8);
12036        __tmp.put_u8(self.info);
12037        if matches!(version, MavlinkVersion::V2) {
12038            let len = __tmp.len();
12039            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12040        } else {
12041            __tmp.len()
12042        }
12043    }
12044}
12045#[doc = "ESC information for higher rate streaming. Recommended streaming rate is ~10 Hz. Information that changes more slowly is sent in ESC_INFO. It should typically only be streamed on high-bandwidth links (i.e. to a companion computer)."]
12046#[doc = ""]
12047#[doc = "ID: 291"]
12048#[derive(Debug, Clone, PartialEq)]
12049#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12050#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12051#[cfg_attr(feature = "ts", derive(TS))]
12052#[cfg_attr(feature = "ts", ts(export))]
12053pub struct ESC_STATUS_DATA {
12054    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number."]
12055    pub time_usec: u64,
12056    #[doc = "Reported motor RPM from each ESC (negative for reverse rotation)."]
12057    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12058    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12059    pub rpm: [i32; 4],
12060    #[doc = "Voltage measured from each ESC."]
12061    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12062    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12063    pub voltage: [f32; 4],
12064    #[doc = "Current measured from each ESC."]
12065    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12066    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12067    pub current: [f32; 4],
12068    #[doc = "Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4."]
12069    pub index: u8,
12070}
12071impl ESC_STATUS_DATA {
12072    pub const ENCODED_LEN: usize = 57usize;
12073    pub const DEFAULT: Self = Self {
12074        time_usec: 0_u64,
12075        rpm: [0_i32; 4usize],
12076        voltage: [0.0_f32; 4usize],
12077        current: [0.0_f32; 4usize],
12078        index: 0_u8,
12079    };
12080    #[cfg(feature = "arbitrary")]
12081    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12082        use arbitrary::{Arbitrary, Unstructured};
12083        let mut buf = [0u8; 1024];
12084        rng.fill_bytes(&mut buf);
12085        let mut unstructured = Unstructured::new(&buf);
12086        Self::arbitrary(&mut unstructured).unwrap_or_default()
12087    }
12088}
12089impl Default for ESC_STATUS_DATA {
12090    fn default() -> Self {
12091        Self::DEFAULT.clone()
12092    }
12093}
12094impl MessageData for ESC_STATUS_DATA {
12095    type Message = MavMessage;
12096    const ID: u32 = 291u32;
12097    const NAME: &'static str = "ESC_STATUS";
12098    const EXTRA_CRC: u8 = 10u8;
12099    const ENCODED_LEN: usize = 57usize;
12100    fn deser(
12101        _version: MavlinkVersion,
12102        __input: &[u8],
12103    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12104        let avail_len = __input.len();
12105        let mut payload_buf = [0; Self::ENCODED_LEN];
12106        let mut buf = if avail_len < Self::ENCODED_LEN {
12107            payload_buf[0..avail_len].copy_from_slice(__input);
12108            Bytes::new(&payload_buf)
12109        } else {
12110            Bytes::new(__input)
12111        };
12112        let mut __struct = Self::default();
12113        __struct.time_usec = buf.get_u64_le();
12114        for v in &mut __struct.rpm {
12115            let val = buf.get_i32_le();
12116            *v = val;
12117        }
12118        for v in &mut __struct.voltage {
12119            let val = buf.get_f32_le();
12120            *v = val;
12121        }
12122        for v in &mut __struct.current {
12123            let val = buf.get_f32_le();
12124            *v = val;
12125        }
12126        __struct.index = buf.get_u8();
12127        Ok(__struct)
12128    }
12129    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12130        let mut __tmp = BytesMut::new(bytes);
12131        #[allow(clippy::absurd_extreme_comparisons)]
12132        #[allow(unused_comparisons)]
12133        if __tmp.remaining() < Self::ENCODED_LEN {
12134            panic!(
12135                "buffer is too small (need {} bytes, but got {})",
12136                Self::ENCODED_LEN,
12137                __tmp.remaining(),
12138            )
12139        }
12140        __tmp.put_u64_le(self.time_usec);
12141        for val in &self.rpm {
12142            __tmp.put_i32_le(*val);
12143        }
12144        for val in &self.voltage {
12145            __tmp.put_f32_le(*val);
12146        }
12147        for val in &self.current {
12148            __tmp.put_f32_le(*val);
12149        }
12150        __tmp.put_u8(self.index);
12151        if matches!(version, MavlinkVersion::V2) {
12152            let len = __tmp.len();
12153            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12154        } else {
12155            __tmp.len()
12156        }
12157    }
12158}
12159#[doc = "Estimator status message including flags, innovation test ratios and estimated accuracies. The flags message is an integer bitmask containing information on which EKF outputs are valid. See the ESTIMATOR_STATUS_FLAGS enum definition for further information. The innovation test ratios show the magnitude of the sensor innovation divided by the innovation check threshold. Under normal operation the innovation test ratios should be below 0.5 with occasional values up to 1.0. Values greater than 1.0 should be rare under normal operation and indicate that a measurement has been rejected by the filter. The user should be notified if an innovation test ratio greater than 1.0 is recorded. Notifications for values in the range between 0.5 and 1.0 should be optional and controllable by the user."]
12160#[doc = ""]
12161#[doc = "ID: 230"]
12162#[derive(Debug, Clone, PartialEq)]
12163#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12164#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12165#[cfg_attr(feature = "ts", derive(TS))]
12166#[cfg_attr(feature = "ts", ts(export))]
12167pub struct ESTIMATOR_STATUS_DATA {
12168    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
12169    pub time_usec: u64,
12170    #[doc = "Velocity innovation test ratio"]
12171    pub vel_ratio: f32,
12172    #[doc = "Horizontal position innovation test ratio"]
12173    pub pos_horiz_ratio: f32,
12174    #[doc = "Vertical position innovation test ratio"]
12175    pub pos_vert_ratio: f32,
12176    #[doc = "Magnetometer innovation test ratio"]
12177    pub mag_ratio: f32,
12178    #[doc = "Height above terrain innovation test ratio"]
12179    pub hagl_ratio: f32,
12180    #[doc = "True airspeed innovation test ratio"]
12181    pub tas_ratio: f32,
12182    #[doc = "Horizontal position 1-STD accuracy relative to the EKF local origin"]
12183    pub pos_horiz_accuracy: f32,
12184    #[doc = "Vertical position 1-STD accuracy relative to the EKF local origin"]
12185    pub pos_vert_accuracy: f32,
12186    #[doc = "Bitmap indicating which EKF outputs are valid."]
12187    pub flags: EstimatorStatusFlags,
12188}
12189impl ESTIMATOR_STATUS_DATA {
12190    pub const ENCODED_LEN: usize = 42usize;
12191    pub const DEFAULT: Self = Self {
12192        time_usec: 0_u64,
12193        vel_ratio: 0.0_f32,
12194        pos_horiz_ratio: 0.0_f32,
12195        pos_vert_ratio: 0.0_f32,
12196        mag_ratio: 0.0_f32,
12197        hagl_ratio: 0.0_f32,
12198        tas_ratio: 0.0_f32,
12199        pos_horiz_accuracy: 0.0_f32,
12200        pos_vert_accuracy: 0.0_f32,
12201        flags: EstimatorStatusFlags::DEFAULT,
12202    };
12203    #[cfg(feature = "arbitrary")]
12204    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12205        use arbitrary::{Arbitrary, Unstructured};
12206        let mut buf = [0u8; 1024];
12207        rng.fill_bytes(&mut buf);
12208        let mut unstructured = Unstructured::new(&buf);
12209        Self::arbitrary(&mut unstructured).unwrap_or_default()
12210    }
12211}
12212impl Default for ESTIMATOR_STATUS_DATA {
12213    fn default() -> Self {
12214        Self::DEFAULT.clone()
12215    }
12216}
12217impl MessageData for ESTIMATOR_STATUS_DATA {
12218    type Message = MavMessage;
12219    const ID: u32 = 230u32;
12220    const NAME: &'static str = "ESTIMATOR_STATUS";
12221    const EXTRA_CRC: u8 = 163u8;
12222    const ENCODED_LEN: usize = 42usize;
12223    fn deser(
12224        _version: MavlinkVersion,
12225        __input: &[u8],
12226    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12227        let avail_len = __input.len();
12228        let mut payload_buf = [0; Self::ENCODED_LEN];
12229        let mut buf = if avail_len < Self::ENCODED_LEN {
12230            payload_buf[0..avail_len].copy_from_slice(__input);
12231            Bytes::new(&payload_buf)
12232        } else {
12233            Bytes::new(__input)
12234        };
12235        let mut __struct = Self::default();
12236        __struct.time_usec = buf.get_u64_le();
12237        __struct.vel_ratio = buf.get_f32_le();
12238        __struct.pos_horiz_ratio = buf.get_f32_le();
12239        __struct.pos_vert_ratio = buf.get_f32_le();
12240        __struct.mag_ratio = buf.get_f32_le();
12241        __struct.hagl_ratio = buf.get_f32_le();
12242        __struct.tas_ratio = buf.get_f32_le();
12243        __struct.pos_horiz_accuracy = buf.get_f32_le();
12244        __struct.pos_vert_accuracy = buf.get_f32_le();
12245        let tmp = buf.get_u16_le();
12246        __struct.flags = EstimatorStatusFlags::from_bits(tmp & EstimatorStatusFlags::all().bits())
12247            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12248                flag_type: "EstimatorStatusFlags",
12249                value: tmp as u32,
12250            })?;
12251        Ok(__struct)
12252    }
12253    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12254        let mut __tmp = BytesMut::new(bytes);
12255        #[allow(clippy::absurd_extreme_comparisons)]
12256        #[allow(unused_comparisons)]
12257        if __tmp.remaining() < Self::ENCODED_LEN {
12258            panic!(
12259                "buffer is too small (need {} bytes, but got {})",
12260                Self::ENCODED_LEN,
12261                __tmp.remaining(),
12262            )
12263        }
12264        __tmp.put_u64_le(self.time_usec);
12265        __tmp.put_f32_le(self.vel_ratio);
12266        __tmp.put_f32_le(self.pos_horiz_ratio);
12267        __tmp.put_f32_le(self.pos_vert_ratio);
12268        __tmp.put_f32_le(self.mag_ratio);
12269        __tmp.put_f32_le(self.hagl_ratio);
12270        __tmp.put_f32_le(self.tas_ratio);
12271        __tmp.put_f32_le(self.pos_horiz_accuracy);
12272        __tmp.put_f32_le(self.pos_vert_accuracy);
12273        __tmp.put_u16_le(self.flags.bits());
12274        if matches!(version, MavlinkVersion::V2) {
12275            let len = __tmp.len();
12276            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12277        } else {
12278            __tmp.len()
12279        }
12280    }
12281}
12282#[doc = "Event message. Each new event from a particular component gets a new sequence number. The same message might be sent multiple times if (re-)requested. Most events are broadcast, some can be specific to a target component (as receivers keep track of the sequence for missed events, all events need to be broadcast. Thus we use destination_component instead of target_component)."]
12283#[doc = ""]
12284#[doc = "ID: 410"]
12285#[derive(Debug, Clone, PartialEq)]
12286#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12287#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12288#[cfg_attr(feature = "ts", derive(TS))]
12289#[cfg_attr(feature = "ts", ts(export))]
12290pub struct EVENT_DATA {
12291    #[doc = "Event ID (as defined in the component metadata)"]
12292    pub id: u32,
12293    #[doc = "Timestamp (time since system boot when the event happened)."]
12294    pub event_time_boot_ms: u32,
12295    #[doc = "Sequence number."]
12296    pub sequence: u16,
12297    #[doc = "Component ID"]
12298    pub destination_component: u8,
12299    #[doc = "System ID"]
12300    pub destination_system: u8,
12301    #[doc = "Log levels: 4 bits MSB: internal (for logging purposes), 4 bits LSB: external. Levels: Emergency = 0, Alert = 1, Critical = 2, Error = 3, Warning = 4, Notice = 5, Info = 6, Debug = 7, Protocol = 8, Disabled = 9"]
12302    pub log_levels: u8,
12303    #[doc = "Arguments (depend on event ID)."]
12304    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12305    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12306    pub arguments: [u8; 40],
12307}
12308impl EVENT_DATA {
12309    pub const ENCODED_LEN: usize = 53usize;
12310    pub const DEFAULT: Self = Self {
12311        id: 0_u32,
12312        event_time_boot_ms: 0_u32,
12313        sequence: 0_u16,
12314        destination_component: 0_u8,
12315        destination_system: 0_u8,
12316        log_levels: 0_u8,
12317        arguments: [0_u8; 40usize],
12318    };
12319    #[cfg(feature = "arbitrary")]
12320    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12321        use arbitrary::{Arbitrary, Unstructured};
12322        let mut buf = [0u8; 1024];
12323        rng.fill_bytes(&mut buf);
12324        let mut unstructured = Unstructured::new(&buf);
12325        Self::arbitrary(&mut unstructured).unwrap_or_default()
12326    }
12327}
12328impl Default for EVENT_DATA {
12329    fn default() -> Self {
12330        Self::DEFAULT.clone()
12331    }
12332}
12333impl MessageData for EVENT_DATA {
12334    type Message = MavMessage;
12335    const ID: u32 = 410u32;
12336    const NAME: &'static str = "EVENT";
12337    const EXTRA_CRC: u8 = 160u8;
12338    const ENCODED_LEN: usize = 53usize;
12339    fn deser(
12340        _version: MavlinkVersion,
12341        __input: &[u8],
12342    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12343        let avail_len = __input.len();
12344        let mut payload_buf = [0; Self::ENCODED_LEN];
12345        let mut buf = if avail_len < Self::ENCODED_LEN {
12346            payload_buf[0..avail_len].copy_from_slice(__input);
12347            Bytes::new(&payload_buf)
12348        } else {
12349            Bytes::new(__input)
12350        };
12351        let mut __struct = Self::default();
12352        __struct.id = buf.get_u32_le();
12353        __struct.event_time_boot_ms = buf.get_u32_le();
12354        __struct.sequence = buf.get_u16_le();
12355        __struct.destination_component = buf.get_u8();
12356        __struct.destination_system = buf.get_u8();
12357        __struct.log_levels = buf.get_u8();
12358        for v in &mut __struct.arguments {
12359            let val = buf.get_u8();
12360            *v = val;
12361        }
12362        Ok(__struct)
12363    }
12364    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12365        let mut __tmp = BytesMut::new(bytes);
12366        #[allow(clippy::absurd_extreme_comparisons)]
12367        #[allow(unused_comparisons)]
12368        if __tmp.remaining() < Self::ENCODED_LEN {
12369            panic!(
12370                "buffer is too small (need {} bytes, but got {})",
12371                Self::ENCODED_LEN,
12372                __tmp.remaining(),
12373            )
12374        }
12375        __tmp.put_u32_le(self.id);
12376        __tmp.put_u32_le(self.event_time_boot_ms);
12377        __tmp.put_u16_le(self.sequence);
12378        __tmp.put_u8(self.destination_component);
12379        __tmp.put_u8(self.destination_system);
12380        __tmp.put_u8(self.log_levels);
12381        for val in &self.arguments {
12382            __tmp.put_u8(*val);
12383        }
12384        if matches!(version, MavlinkVersion::V2) {
12385            let len = __tmp.len();
12386            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12387        } else {
12388            __tmp.len()
12389        }
12390    }
12391}
12392#[doc = "Provides state for additional features."]
12393#[doc = ""]
12394#[doc = "ID: 245"]
12395#[derive(Debug, Clone, PartialEq)]
12396#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12397#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12398#[cfg_attr(feature = "ts", derive(TS))]
12399#[cfg_attr(feature = "ts", ts(export))]
12400pub struct EXTENDED_SYS_STATE_DATA {
12401    #[doc = "The VTOL state if applicable. Is set to MAV_VTOL_STATE_UNDEFINED if UAV is not in VTOL configuration."]
12402    pub vtol_state: MavVtolState,
12403    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
12404    pub landed_state: MavLandedState,
12405}
12406impl EXTENDED_SYS_STATE_DATA {
12407    pub const ENCODED_LEN: usize = 2usize;
12408    pub const DEFAULT: Self = Self {
12409        vtol_state: MavVtolState::DEFAULT,
12410        landed_state: MavLandedState::DEFAULT,
12411    };
12412    #[cfg(feature = "arbitrary")]
12413    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12414        use arbitrary::{Arbitrary, Unstructured};
12415        let mut buf = [0u8; 1024];
12416        rng.fill_bytes(&mut buf);
12417        let mut unstructured = Unstructured::new(&buf);
12418        Self::arbitrary(&mut unstructured).unwrap_or_default()
12419    }
12420}
12421impl Default for EXTENDED_SYS_STATE_DATA {
12422    fn default() -> Self {
12423        Self::DEFAULT.clone()
12424    }
12425}
12426impl MessageData for EXTENDED_SYS_STATE_DATA {
12427    type Message = MavMessage;
12428    const ID: u32 = 245u32;
12429    const NAME: &'static str = "EXTENDED_SYS_STATE";
12430    const EXTRA_CRC: u8 = 130u8;
12431    const ENCODED_LEN: usize = 2usize;
12432    fn deser(
12433        _version: MavlinkVersion,
12434        __input: &[u8],
12435    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12436        let avail_len = __input.len();
12437        let mut payload_buf = [0; Self::ENCODED_LEN];
12438        let mut buf = if avail_len < Self::ENCODED_LEN {
12439            payload_buf[0..avail_len].copy_from_slice(__input);
12440            Bytes::new(&payload_buf)
12441        } else {
12442            Bytes::new(__input)
12443        };
12444        let mut __struct = Self::default();
12445        let tmp = buf.get_u8();
12446        __struct.vtol_state =
12447            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12448                enum_type: "MavVtolState",
12449                value: tmp as u32,
12450            })?;
12451        let tmp = buf.get_u8();
12452        __struct.landed_state =
12453            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12454                enum_type: "MavLandedState",
12455                value: tmp as u32,
12456            })?;
12457        Ok(__struct)
12458    }
12459    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12460        let mut __tmp = BytesMut::new(bytes);
12461        #[allow(clippy::absurd_extreme_comparisons)]
12462        #[allow(unused_comparisons)]
12463        if __tmp.remaining() < Self::ENCODED_LEN {
12464            panic!(
12465                "buffer is too small (need {} bytes, but got {})",
12466                Self::ENCODED_LEN,
12467                __tmp.remaining(),
12468            )
12469        }
12470        __tmp.put_u8(self.vtol_state as u8);
12471        __tmp.put_u8(self.landed_state as u8);
12472        if matches!(version, MavlinkVersion::V2) {
12473            let len = __tmp.len();
12474            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12475        } else {
12476            __tmp.len()
12477        }
12478    }
12479}
12480#[doc = "Status of geo-fencing. Sent in extended status stream when fencing enabled."]
12481#[doc = ""]
12482#[doc = "ID: 162"]
12483#[derive(Debug, Clone, PartialEq)]
12484#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12485#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12486#[cfg_attr(feature = "ts", derive(TS))]
12487#[cfg_attr(feature = "ts", ts(export))]
12488pub struct FENCE_STATUS_DATA {
12489    #[doc = "Time (since boot) of last breach."]
12490    pub breach_time: u32,
12491    #[doc = "Number of fence breaches."]
12492    pub breach_count: u16,
12493    #[doc = "Breach status (0 if currently inside fence, 1 if outside)."]
12494    pub breach_status: u8,
12495    #[doc = "Last breach type."]
12496    pub breach_type: FenceBreach,
12497    #[doc = "Active action to prevent fence breach"]
12498    #[cfg_attr(feature = "serde", serde(default))]
12499    pub breach_mitigation: FenceMitigate,
12500}
12501impl FENCE_STATUS_DATA {
12502    pub const ENCODED_LEN: usize = 9usize;
12503    pub const DEFAULT: Self = Self {
12504        breach_time: 0_u32,
12505        breach_count: 0_u16,
12506        breach_status: 0_u8,
12507        breach_type: FenceBreach::DEFAULT,
12508        breach_mitigation: FenceMitigate::DEFAULT,
12509    };
12510    #[cfg(feature = "arbitrary")]
12511    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12512        use arbitrary::{Arbitrary, Unstructured};
12513        let mut buf = [0u8; 1024];
12514        rng.fill_bytes(&mut buf);
12515        let mut unstructured = Unstructured::new(&buf);
12516        Self::arbitrary(&mut unstructured).unwrap_or_default()
12517    }
12518}
12519impl Default for FENCE_STATUS_DATA {
12520    fn default() -> Self {
12521        Self::DEFAULT.clone()
12522    }
12523}
12524impl MessageData for FENCE_STATUS_DATA {
12525    type Message = MavMessage;
12526    const ID: u32 = 162u32;
12527    const NAME: &'static str = "FENCE_STATUS";
12528    const EXTRA_CRC: u8 = 189u8;
12529    const ENCODED_LEN: usize = 9usize;
12530    fn deser(
12531        _version: MavlinkVersion,
12532        __input: &[u8],
12533    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12534        let avail_len = __input.len();
12535        let mut payload_buf = [0; Self::ENCODED_LEN];
12536        let mut buf = if avail_len < Self::ENCODED_LEN {
12537            payload_buf[0..avail_len].copy_from_slice(__input);
12538            Bytes::new(&payload_buf)
12539        } else {
12540            Bytes::new(__input)
12541        };
12542        let mut __struct = Self::default();
12543        __struct.breach_time = buf.get_u32_le();
12544        __struct.breach_count = buf.get_u16_le();
12545        __struct.breach_status = buf.get_u8();
12546        let tmp = buf.get_u8();
12547        __struct.breach_type =
12548            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12549                enum_type: "FenceBreach",
12550                value: tmp as u32,
12551            })?;
12552        let tmp = buf.get_u8();
12553        __struct.breach_mitigation =
12554            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12555                enum_type: "FenceMitigate",
12556                value: tmp as u32,
12557            })?;
12558        Ok(__struct)
12559    }
12560    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12561        let mut __tmp = BytesMut::new(bytes);
12562        #[allow(clippy::absurd_extreme_comparisons)]
12563        #[allow(unused_comparisons)]
12564        if __tmp.remaining() < Self::ENCODED_LEN {
12565            panic!(
12566                "buffer is too small (need {} bytes, but got {})",
12567                Self::ENCODED_LEN,
12568                __tmp.remaining(),
12569            )
12570        }
12571        __tmp.put_u32_le(self.breach_time);
12572        __tmp.put_u16_le(self.breach_count);
12573        __tmp.put_u8(self.breach_status);
12574        __tmp.put_u8(self.breach_type as u8);
12575        if matches!(version, MavlinkVersion::V2) {
12576            __tmp.put_u8(self.breach_mitigation as u8);
12577            let len = __tmp.len();
12578            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12579        } else {
12580            __tmp.len()
12581        }
12582    }
12583}
12584#[doc = "File transfer protocol message: <https://mavlink.io/en/services/ftp.html>."]
12585#[doc = ""]
12586#[doc = "ID: 110"]
12587#[derive(Debug, Clone, PartialEq)]
12588#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12589#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12590#[cfg_attr(feature = "ts", derive(TS))]
12591#[cfg_attr(feature = "ts", ts(export))]
12592pub struct FILE_TRANSFER_PROTOCOL_DATA {
12593    #[doc = "Network ID (0 for broadcast)"]
12594    pub target_network: u8,
12595    #[doc = "System ID (0 for broadcast)"]
12596    pub target_system: u8,
12597    #[doc = "Component ID (0 for broadcast)"]
12598    pub target_component: u8,
12599    #[doc = "Variable length payload. The length is defined by the remaining message length when subtracting the header and other fields. The content/format of this block is defined in <https://mavlink.io/en/services/ftp.html>."]
12600    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12601    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12602    pub payload: [u8; 251],
12603}
12604impl FILE_TRANSFER_PROTOCOL_DATA {
12605    pub const ENCODED_LEN: usize = 254usize;
12606    pub const DEFAULT: Self = Self {
12607        target_network: 0_u8,
12608        target_system: 0_u8,
12609        target_component: 0_u8,
12610        payload: [0_u8; 251usize],
12611    };
12612    #[cfg(feature = "arbitrary")]
12613    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12614        use arbitrary::{Arbitrary, Unstructured};
12615        let mut buf = [0u8; 1024];
12616        rng.fill_bytes(&mut buf);
12617        let mut unstructured = Unstructured::new(&buf);
12618        Self::arbitrary(&mut unstructured).unwrap_or_default()
12619    }
12620}
12621impl Default for FILE_TRANSFER_PROTOCOL_DATA {
12622    fn default() -> Self {
12623        Self::DEFAULT.clone()
12624    }
12625}
12626impl MessageData for FILE_TRANSFER_PROTOCOL_DATA {
12627    type Message = MavMessage;
12628    const ID: u32 = 110u32;
12629    const NAME: &'static str = "FILE_TRANSFER_PROTOCOL";
12630    const EXTRA_CRC: u8 = 84u8;
12631    const ENCODED_LEN: usize = 254usize;
12632    fn deser(
12633        _version: MavlinkVersion,
12634        __input: &[u8],
12635    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12636        let avail_len = __input.len();
12637        let mut payload_buf = [0; Self::ENCODED_LEN];
12638        let mut buf = if avail_len < Self::ENCODED_LEN {
12639            payload_buf[0..avail_len].copy_from_slice(__input);
12640            Bytes::new(&payload_buf)
12641        } else {
12642            Bytes::new(__input)
12643        };
12644        let mut __struct = Self::default();
12645        __struct.target_network = buf.get_u8();
12646        __struct.target_system = buf.get_u8();
12647        __struct.target_component = buf.get_u8();
12648        for v in &mut __struct.payload {
12649            let val = buf.get_u8();
12650            *v = val;
12651        }
12652        Ok(__struct)
12653    }
12654    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12655        let mut __tmp = BytesMut::new(bytes);
12656        #[allow(clippy::absurd_extreme_comparisons)]
12657        #[allow(unused_comparisons)]
12658        if __tmp.remaining() < Self::ENCODED_LEN {
12659            panic!(
12660                "buffer is too small (need {} bytes, but got {})",
12661                Self::ENCODED_LEN,
12662                __tmp.remaining(),
12663            )
12664        }
12665        __tmp.put_u8(self.target_network);
12666        __tmp.put_u8(self.target_system);
12667        __tmp.put_u8(self.target_component);
12668        for val in &self.payload {
12669            __tmp.put_u8(*val);
12670        }
12671        if matches!(version, MavlinkVersion::V2) {
12672            let len = __tmp.len();
12673            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12674        } else {
12675            __tmp.len()
12676        }
12677    }
12678}
12679#[doc = "Flight information.         This includes time since boot for arm, takeoff, and land, and a flight number.         Takeoff and landing values reset to zero on arm.         This can be requested using MAV_CMD_REQUEST_MESSAGE.         Note, some fields are misnamed - timestamps are from boot (not UTC) and the flight_uuid is a sequence number."]
12680#[doc = ""]
12681#[doc = "ID: 264"]
12682#[derive(Debug, Clone, PartialEq)]
12683#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12684#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12685#[cfg_attr(feature = "ts", derive(TS))]
12686#[cfg_attr(feature = "ts", ts(export))]
12687pub struct FLIGHT_INFORMATION_DATA {
12688    #[doc = "Timestamp at arming (since system boot). Set to 0 on boot. Set value on arming. Note, field is misnamed UTC."]
12689    pub arming_time_utc: u64,
12690    #[doc = "Timestamp at takeoff (since system boot). Set to 0 at boot and on arming. Note, field is misnamed UTC."]
12691    pub takeoff_time_utc: u64,
12692    #[doc = "Flight number. Note, field is misnamed UUID."]
12693    pub flight_uuid: u64,
12694    #[doc = "Timestamp (time since system boot)."]
12695    pub time_boot_ms: u32,
12696    #[doc = "Timestamp at landing (in ms since system boot). Set to 0 at boot and on arming."]
12697    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12698    pub landing_time: u32,
12699}
12700impl FLIGHT_INFORMATION_DATA {
12701    pub const ENCODED_LEN: usize = 32usize;
12702    pub const DEFAULT: Self = Self {
12703        arming_time_utc: 0_u64,
12704        takeoff_time_utc: 0_u64,
12705        flight_uuid: 0_u64,
12706        time_boot_ms: 0_u32,
12707        landing_time: 0_u32,
12708    };
12709    #[cfg(feature = "arbitrary")]
12710    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12711        use arbitrary::{Arbitrary, Unstructured};
12712        let mut buf = [0u8; 1024];
12713        rng.fill_bytes(&mut buf);
12714        let mut unstructured = Unstructured::new(&buf);
12715        Self::arbitrary(&mut unstructured).unwrap_or_default()
12716    }
12717}
12718impl Default for FLIGHT_INFORMATION_DATA {
12719    fn default() -> Self {
12720        Self::DEFAULT.clone()
12721    }
12722}
12723impl MessageData for FLIGHT_INFORMATION_DATA {
12724    type Message = MavMessage;
12725    const ID: u32 = 264u32;
12726    const NAME: &'static str = "FLIGHT_INFORMATION";
12727    const EXTRA_CRC: u8 = 49u8;
12728    const ENCODED_LEN: usize = 32usize;
12729    fn deser(
12730        _version: MavlinkVersion,
12731        __input: &[u8],
12732    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12733        let avail_len = __input.len();
12734        let mut payload_buf = [0; Self::ENCODED_LEN];
12735        let mut buf = if avail_len < Self::ENCODED_LEN {
12736            payload_buf[0..avail_len].copy_from_slice(__input);
12737            Bytes::new(&payload_buf)
12738        } else {
12739            Bytes::new(__input)
12740        };
12741        let mut __struct = Self::default();
12742        __struct.arming_time_utc = buf.get_u64_le();
12743        __struct.takeoff_time_utc = buf.get_u64_le();
12744        __struct.flight_uuid = buf.get_u64_le();
12745        __struct.time_boot_ms = buf.get_u32_le();
12746        __struct.landing_time = buf.get_u32_le();
12747        Ok(__struct)
12748    }
12749    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12750        let mut __tmp = BytesMut::new(bytes);
12751        #[allow(clippy::absurd_extreme_comparisons)]
12752        #[allow(unused_comparisons)]
12753        if __tmp.remaining() < Self::ENCODED_LEN {
12754            panic!(
12755                "buffer is too small (need {} bytes, but got {})",
12756                Self::ENCODED_LEN,
12757                __tmp.remaining(),
12758            )
12759        }
12760        __tmp.put_u64_le(self.arming_time_utc);
12761        __tmp.put_u64_le(self.takeoff_time_utc);
12762        __tmp.put_u64_le(self.flight_uuid);
12763        __tmp.put_u32_le(self.time_boot_ms);
12764        if matches!(version, MavlinkVersion::V2) {
12765            __tmp.put_u32_le(self.landing_time);
12766            let len = __tmp.len();
12767            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12768        } else {
12769            __tmp.len()
12770        }
12771    }
12772}
12773#[doc = "Current motion information from a designated system."]
12774#[doc = ""]
12775#[doc = "ID: 144"]
12776#[derive(Debug, Clone, PartialEq)]
12777#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12778#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12779#[cfg_attr(feature = "ts", derive(TS))]
12780#[cfg_attr(feature = "ts", ts(export))]
12781pub struct FOLLOW_TARGET_DATA {
12782    #[doc = "Timestamp (time since system boot)."]
12783    pub timestamp: u64,
12784    #[doc = "button states or switches of a tracker device"]
12785    pub custom_state: u64,
12786    #[doc = "Latitude (WGS84)"]
12787    pub lat: i32,
12788    #[doc = "Longitude (WGS84)"]
12789    pub lon: i32,
12790    #[doc = "Altitude (MSL)"]
12791    pub alt: f32,
12792    #[doc = "target velocity (0,0,0) for unknown"]
12793    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12794    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12795    pub vel: [f32; 3],
12796    #[doc = "linear target acceleration (0,0,0) for unknown"]
12797    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12798    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12799    pub acc: [f32; 3],
12800    #[doc = "(0 0 0 0 for unknown)"]
12801    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12802    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12803    pub attitude_q: [f32; 4],
12804    #[doc = "(0 0 0 for unknown)"]
12805    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12806    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12807    pub rates: [f32; 3],
12808    #[doc = "eph epv"]
12809    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12810    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12811    pub position_cov: [f32; 3],
12812    #[doc = "bit positions for tracker reporting capabilities (POS = 0, VEL = 1, ACCEL = 2, ATT + RATES = 3)"]
12813    pub est_capabilities: u8,
12814}
12815impl FOLLOW_TARGET_DATA {
12816    pub const ENCODED_LEN: usize = 93usize;
12817    pub const DEFAULT: Self = Self {
12818        timestamp: 0_u64,
12819        custom_state: 0_u64,
12820        lat: 0_i32,
12821        lon: 0_i32,
12822        alt: 0.0_f32,
12823        vel: [0.0_f32; 3usize],
12824        acc: [0.0_f32; 3usize],
12825        attitude_q: [0.0_f32; 4usize],
12826        rates: [0.0_f32; 3usize],
12827        position_cov: [0.0_f32; 3usize],
12828        est_capabilities: 0_u8,
12829    };
12830    #[cfg(feature = "arbitrary")]
12831    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12832        use arbitrary::{Arbitrary, Unstructured};
12833        let mut buf = [0u8; 1024];
12834        rng.fill_bytes(&mut buf);
12835        let mut unstructured = Unstructured::new(&buf);
12836        Self::arbitrary(&mut unstructured).unwrap_or_default()
12837    }
12838}
12839impl Default for FOLLOW_TARGET_DATA {
12840    fn default() -> Self {
12841        Self::DEFAULT.clone()
12842    }
12843}
12844impl MessageData for FOLLOW_TARGET_DATA {
12845    type Message = MavMessage;
12846    const ID: u32 = 144u32;
12847    const NAME: &'static str = "FOLLOW_TARGET";
12848    const EXTRA_CRC: u8 = 127u8;
12849    const ENCODED_LEN: usize = 93usize;
12850    fn deser(
12851        _version: MavlinkVersion,
12852        __input: &[u8],
12853    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12854        let avail_len = __input.len();
12855        let mut payload_buf = [0; Self::ENCODED_LEN];
12856        let mut buf = if avail_len < Self::ENCODED_LEN {
12857            payload_buf[0..avail_len].copy_from_slice(__input);
12858            Bytes::new(&payload_buf)
12859        } else {
12860            Bytes::new(__input)
12861        };
12862        let mut __struct = Self::default();
12863        __struct.timestamp = buf.get_u64_le();
12864        __struct.custom_state = buf.get_u64_le();
12865        __struct.lat = buf.get_i32_le();
12866        __struct.lon = buf.get_i32_le();
12867        __struct.alt = buf.get_f32_le();
12868        for v in &mut __struct.vel {
12869            let val = buf.get_f32_le();
12870            *v = val;
12871        }
12872        for v in &mut __struct.acc {
12873            let val = buf.get_f32_le();
12874            *v = val;
12875        }
12876        for v in &mut __struct.attitude_q {
12877            let val = buf.get_f32_le();
12878            *v = val;
12879        }
12880        for v in &mut __struct.rates {
12881            let val = buf.get_f32_le();
12882            *v = val;
12883        }
12884        for v in &mut __struct.position_cov {
12885            let val = buf.get_f32_le();
12886            *v = val;
12887        }
12888        __struct.est_capabilities = buf.get_u8();
12889        Ok(__struct)
12890    }
12891    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12892        let mut __tmp = BytesMut::new(bytes);
12893        #[allow(clippy::absurd_extreme_comparisons)]
12894        #[allow(unused_comparisons)]
12895        if __tmp.remaining() < Self::ENCODED_LEN {
12896            panic!(
12897                "buffer is too small (need {} bytes, but got {})",
12898                Self::ENCODED_LEN,
12899                __tmp.remaining(),
12900            )
12901        }
12902        __tmp.put_u64_le(self.timestamp);
12903        __tmp.put_u64_le(self.custom_state);
12904        __tmp.put_i32_le(self.lat);
12905        __tmp.put_i32_le(self.lon);
12906        __tmp.put_f32_le(self.alt);
12907        for val in &self.vel {
12908            __tmp.put_f32_le(*val);
12909        }
12910        for val in &self.acc {
12911            __tmp.put_f32_le(*val);
12912        }
12913        for val in &self.attitude_q {
12914            __tmp.put_f32_le(*val);
12915        }
12916        for val in &self.rates {
12917            __tmp.put_f32_le(*val);
12918        }
12919        for val in &self.position_cov {
12920            __tmp.put_f32_le(*val);
12921        }
12922        __tmp.put_u8(self.est_capabilities);
12923        if matches!(version, MavlinkVersion::V2) {
12924            let len = __tmp.len();
12925            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12926        } else {
12927            __tmp.len()
12928        }
12929    }
12930}
12931#[doc = "Fuel status.         This message provides \"generic\" fuel level information for  in a GCS and for triggering failsafes in an autopilot.         The fuel type and associated units for fields in this message are defined in the enum MAV_FUEL_TYPE.          The reported `consumed_fuel` and `remaining_fuel` must only be supplied if measured: they must not be inferred from the `maximum_fuel` and the other value.         A recipient can assume that if these fields are supplied they are accurate.         If not provided, the recipient can infer `remaining_fuel` from `maximum_fuel` and `consumed_fuel` on the assumption that the fuel was initially at its maximum (this is what battery monitors assume).         Note however that this is an assumption, and the UI should prompt the user appropriately (i.e. notify user that they should fill the tank before boot).          This kind of information may also be sent in fuel-specific messages such as BATTERY_STATUS_V2.         If both messages are sent for the same fuel system, the ids and corresponding information must match.          This should be streamed (nominally at 0.1 Hz)."]
12932#[doc = ""]
12933#[doc = "ID: 371"]
12934#[derive(Debug, Clone, PartialEq)]
12935#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12936#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12937#[cfg_attr(feature = "ts", derive(TS))]
12938#[cfg_attr(feature = "ts", ts(export))]
12939pub struct FUEL_STATUS_DATA {
12940    #[doc = "Capacity when full. Must be provided."]
12941    pub maximum_fuel: f32,
12942    #[doc = "Consumed fuel (measured). This value should not be inferred: if not measured set to NaN. NaN: field not provided."]
12943    pub consumed_fuel: f32,
12944    #[doc = "Remaining fuel until empty (measured). The value should not be inferred: if not measured set to NaN. NaN: field not provided."]
12945    pub remaining_fuel: f32,
12946    #[doc = "Positive value when emptying/using, and negative if filling/replacing. NaN: field not provided."]
12947    pub flow_rate: f32,
12948    #[doc = "Fuel temperature. NaN: field not provided."]
12949    pub temperature: f32,
12950    #[doc = "Fuel type. Defines units for fuel capacity and consumption fields above."]
12951    pub fuel_type: MavFuelType,
12952    #[doc = "Fuel ID. Must match ID of other messages for same fuel system, such as BATTERY_STATUS_V2."]
12953    pub id: u8,
12954    #[doc = "Percentage of remaining fuel, relative to full. Values: [0-100], UINT8_MAX: field not provided."]
12955    pub percent_remaining: u8,
12956}
12957impl FUEL_STATUS_DATA {
12958    pub const ENCODED_LEN: usize = 26usize;
12959    pub const DEFAULT: Self = Self {
12960        maximum_fuel: 0.0_f32,
12961        consumed_fuel: 0.0_f32,
12962        remaining_fuel: 0.0_f32,
12963        flow_rate: 0.0_f32,
12964        temperature: 0.0_f32,
12965        fuel_type: MavFuelType::DEFAULT,
12966        id: 0_u8,
12967        percent_remaining: 0_u8,
12968    };
12969    #[cfg(feature = "arbitrary")]
12970    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12971        use arbitrary::{Arbitrary, Unstructured};
12972        let mut buf = [0u8; 1024];
12973        rng.fill_bytes(&mut buf);
12974        let mut unstructured = Unstructured::new(&buf);
12975        Self::arbitrary(&mut unstructured).unwrap_or_default()
12976    }
12977}
12978impl Default for FUEL_STATUS_DATA {
12979    fn default() -> Self {
12980        Self::DEFAULT.clone()
12981    }
12982}
12983impl MessageData for FUEL_STATUS_DATA {
12984    type Message = MavMessage;
12985    const ID: u32 = 371u32;
12986    const NAME: &'static str = "FUEL_STATUS";
12987    const EXTRA_CRC: u8 = 10u8;
12988    const ENCODED_LEN: usize = 26usize;
12989    fn deser(
12990        _version: MavlinkVersion,
12991        __input: &[u8],
12992    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12993        let avail_len = __input.len();
12994        let mut payload_buf = [0; Self::ENCODED_LEN];
12995        let mut buf = if avail_len < Self::ENCODED_LEN {
12996            payload_buf[0..avail_len].copy_from_slice(__input);
12997            Bytes::new(&payload_buf)
12998        } else {
12999            Bytes::new(__input)
13000        };
13001        let mut __struct = Self::default();
13002        __struct.maximum_fuel = buf.get_f32_le();
13003        __struct.consumed_fuel = buf.get_f32_le();
13004        __struct.remaining_fuel = buf.get_f32_le();
13005        __struct.flow_rate = buf.get_f32_le();
13006        __struct.temperature = buf.get_f32_le();
13007        let tmp = buf.get_u32_le();
13008        __struct.fuel_type = FromPrimitive::from_u32(tmp).ok_or(
13009            ::mavlink_core::error::ParserError::InvalidEnum {
13010                enum_type: "MavFuelType",
13011                value: tmp as u32,
13012            },
13013        )?;
13014        __struct.id = buf.get_u8();
13015        __struct.percent_remaining = buf.get_u8();
13016        Ok(__struct)
13017    }
13018    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13019        let mut __tmp = BytesMut::new(bytes);
13020        #[allow(clippy::absurd_extreme_comparisons)]
13021        #[allow(unused_comparisons)]
13022        if __tmp.remaining() < Self::ENCODED_LEN {
13023            panic!(
13024                "buffer is too small (need {} bytes, but got {})",
13025                Self::ENCODED_LEN,
13026                __tmp.remaining(),
13027            )
13028        }
13029        __tmp.put_f32_le(self.maximum_fuel);
13030        __tmp.put_f32_le(self.consumed_fuel);
13031        __tmp.put_f32_le(self.remaining_fuel);
13032        __tmp.put_f32_le(self.flow_rate);
13033        __tmp.put_f32_le(self.temperature);
13034        __tmp.put_u32_le(self.fuel_type as u32);
13035        __tmp.put_u8(self.id);
13036        __tmp.put_u8(self.percent_remaining);
13037        if matches!(version, MavlinkVersion::V2) {
13038            let len = __tmp.len();
13039            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13040        } else {
13041            __tmp.len()
13042        }
13043    }
13044}
13045#[doc = "Fixed-wing soaring (i.e. thermal seeking) data."]
13046#[doc = ""]
13047#[doc = "ID: 8011"]
13048#[derive(Debug, Clone, PartialEq)]
13049#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13050#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13051#[cfg_attr(feature = "ts", derive(TS))]
13052#[cfg_attr(feature = "ts", ts(export))]
13053pub struct FW_SOARING_DATA_DATA {
13054    #[doc = "Timestamp"]
13055    pub timestamp: u64,
13056    #[doc = "Timestamp since last mode change"]
13057    pub timestampModeChanged: u64,
13058    #[doc = "Thermal core updraft strength"]
13059    pub xW: f32,
13060    #[doc = "Thermal radius"]
13061    pub xR: f32,
13062    #[doc = "Thermal center latitude"]
13063    pub xLat: f32,
13064    #[doc = "Thermal center longitude"]
13065    pub xLon: f32,
13066    #[doc = "Variance W"]
13067    pub VarW: f32,
13068    #[doc = "Variance R"]
13069    pub VarR: f32,
13070    #[doc = "Variance Lat"]
13071    pub VarLat: f32,
13072    #[doc = "Variance Lon"]
13073    pub VarLon: f32,
13074    #[doc = "Suggested loiter radius"]
13075    pub LoiterRadius: f32,
13076    #[doc = "Suggested loiter direction"]
13077    pub LoiterDirection: f32,
13078    #[doc = "Distance to soar point"]
13079    pub DistToSoarPoint: f32,
13080    #[doc = "Expected sink rate at current airspeed, roll and throttle"]
13081    pub vSinkExp: f32,
13082    #[doc = "Measurement / updraft speed at current/local airplane position"]
13083    pub z1_LocalUpdraftSpeed: f32,
13084    #[doc = "Measurement / roll angle tracking error"]
13085    pub z2_DeltaRoll: f32,
13086    #[doc = "Expected measurement 1"]
13087    pub z1_exp: f32,
13088    #[doc = "Expected measurement 2"]
13089    pub z2_exp: f32,
13090    #[doc = "Thermal drift (from estimator prediction step only)"]
13091    pub ThermalGSNorth: f32,
13092    #[doc = "Thermal drift (from estimator prediction step only)"]
13093    pub ThermalGSEast: f32,
13094    #[doc = "Total specific energy change (filtered)"]
13095    pub TSE_dot: f32,
13096    #[doc = "Debug variable 1"]
13097    pub DebugVar1: f32,
13098    #[doc = "Debug variable 2"]
13099    pub DebugVar2: f32,
13100    #[doc = "Control Mode [-]"]
13101    pub ControlMode: u8,
13102    #[doc = "Data valid [-]"]
13103    pub valid: u8,
13104}
13105impl FW_SOARING_DATA_DATA {
13106    pub const ENCODED_LEN: usize = 102usize;
13107    pub const DEFAULT: Self = Self {
13108        timestamp: 0_u64,
13109        timestampModeChanged: 0_u64,
13110        xW: 0.0_f32,
13111        xR: 0.0_f32,
13112        xLat: 0.0_f32,
13113        xLon: 0.0_f32,
13114        VarW: 0.0_f32,
13115        VarR: 0.0_f32,
13116        VarLat: 0.0_f32,
13117        VarLon: 0.0_f32,
13118        LoiterRadius: 0.0_f32,
13119        LoiterDirection: 0.0_f32,
13120        DistToSoarPoint: 0.0_f32,
13121        vSinkExp: 0.0_f32,
13122        z1_LocalUpdraftSpeed: 0.0_f32,
13123        z2_DeltaRoll: 0.0_f32,
13124        z1_exp: 0.0_f32,
13125        z2_exp: 0.0_f32,
13126        ThermalGSNorth: 0.0_f32,
13127        ThermalGSEast: 0.0_f32,
13128        TSE_dot: 0.0_f32,
13129        DebugVar1: 0.0_f32,
13130        DebugVar2: 0.0_f32,
13131        ControlMode: 0_u8,
13132        valid: 0_u8,
13133    };
13134    #[cfg(feature = "arbitrary")]
13135    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13136        use arbitrary::{Arbitrary, Unstructured};
13137        let mut buf = [0u8; 1024];
13138        rng.fill_bytes(&mut buf);
13139        let mut unstructured = Unstructured::new(&buf);
13140        Self::arbitrary(&mut unstructured).unwrap_or_default()
13141    }
13142}
13143impl Default for FW_SOARING_DATA_DATA {
13144    fn default() -> Self {
13145        Self::DEFAULT.clone()
13146    }
13147}
13148impl MessageData for FW_SOARING_DATA_DATA {
13149    type Message = MavMessage;
13150    const ID: u32 = 8011u32;
13151    const NAME: &'static str = "FW_SOARING_DATA";
13152    const EXTRA_CRC: u8 = 20u8;
13153    const ENCODED_LEN: usize = 102usize;
13154    fn deser(
13155        _version: MavlinkVersion,
13156        __input: &[u8],
13157    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13158        let avail_len = __input.len();
13159        let mut payload_buf = [0; Self::ENCODED_LEN];
13160        let mut buf = if avail_len < Self::ENCODED_LEN {
13161            payload_buf[0..avail_len].copy_from_slice(__input);
13162            Bytes::new(&payload_buf)
13163        } else {
13164            Bytes::new(__input)
13165        };
13166        let mut __struct = Self::default();
13167        __struct.timestamp = buf.get_u64_le();
13168        __struct.timestampModeChanged = buf.get_u64_le();
13169        __struct.xW = buf.get_f32_le();
13170        __struct.xR = buf.get_f32_le();
13171        __struct.xLat = buf.get_f32_le();
13172        __struct.xLon = buf.get_f32_le();
13173        __struct.VarW = buf.get_f32_le();
13174        __struct.VarR = buf.get_f32_le();
13175        __struct.VarLat = buf.get_f32_le();
13176        __struct.VarLon = buf.get_f32_le();
13177        __struct.LoiterRadius = buf.get_f32_le();
13178        __struct.LoiterDirection = buf.get_f32_le();
13179        __struct.DistToSoarPoint = buf.get_f32_le();
13180        __struct.vSinkExp = buf.get_f32_le();
13181        __struct.z1_LocalUpdraftSpeed = buf.get_f32_le();
13182        __struct.z2_DeltaRoll = buf.get_f32_le();
13183        __struct.z1_exp = buf.get_f32_le();
13184        __struct.z2_exp = buf.get_f32_le();
13185        __struct.ThermalGSNorth = buf.get_f32_le();
13186        __struct.ThermalGSEast = buf.get_f32_le();
13187        __struct.TSE_dot = buf.get_f32_le();
13188        __struct.DebugVar1 = buf.get_f32_le();
13189        __struct.DebugVar2 = buf.get_f32_le();
13190        __struct.ControlMode = buf.get_u8();
13191        __struct.valid = buf.get_u8();
13192        Ok(__struct)
13193    }
13194    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13195        let mut __tmp = BytesMut::new(bytes);
13196        #[allow(clippy::absurd_extreme_comparisons)]
13197        #[allow(unused_comparisons)]
13198        if __tmp.remaining() < Self::ENCODED_LEN {
13199            panic!(
13200                "buffer is too small (need {} bytes, but got {})",
13201                Self::ENCODED_LEN,
13202                __tmp.remaining(),
13203            )
13204        }
13205        __tmp.put_u64_le(self.timestamp);
13206        __tmp.put_u64_le(self.timestampModeChanged);
13207        __tmp.put_f32_le(self.xW);
13208        __tmp.put_f32_le(self.xR);
13209        __tmp.put_f32_le(self.xLat);
13210        __tmp.put_f32_le(self.xLon);
13211        __tmp.put_f32_le(self.VarW);
13212        __tmp.put_f32_le(self.VarR);
13213        __tmp.put_f32_le(self.VarLat);
13214        __tmp.put_f32_le(self.VarLon);
13215        __tmp.put_f32_le(self.LoiterRadius);
13216        __tmp.put_f32_le(self.LoiterDirection);
13217        __tmp.put_f32_le(self.DistToSoarPoint);
13218        __tmp.put_f32_le(self.vSinkExp);
13219        __tmp.put_f32_le(self.z1_LocalUpdraftSpeed);
13220        __tmp.put_f32_le(self.z2_DeltaRoll);
13221        __tmp.put_f32_le(self.z1_exp);
13222        __tmp.put_f32_le(self.z2_exp);
13223        __tmp.put_f32_le(self.ThermalGSNorth);
13224        __tmp.put_f32_le(self.ThermalGSEast);
13225        __tmp.put_f32_le(self.TSE_dot);
13226        __tmp.put_f32_le(self.DebugVar1);
13227        __tmp.put_f32_le(self.DebugVar2);
13228        __tmp.put_u8(self.ControlMode);
13229        __tmp.put_u8(self.valid);
13230        if matches!(version, MavlinkVersion::V2) {
13231            let len = __tmp.len();
13232            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13233        } else {
13234            __tmp.len()
13235        }
13236    }
13237}
13238#[doc = "Telemetry of power generation system. Alternator or mechanical generator."]
13239#[doc = ""]
13240#[doc = "ID: 373"]
13241#[derive(Debug, Clone, PartialEq)]
13242#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13243#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13244#[cfg_attr(feature = "ts", derive(TS))]
13245#[cfg_attr(feature = "ts", ts(export))]
13246pub struct GENERATOR_STATUS_DATA {
13247    #[doc = "Status flags."]
13248    pub status: MavGeneratorStatusFlag,
13249    #[doc = "Current into/out of battery. Positive for out. Negative for in. NaN: field not provided."]
13250    pub battery_current: f32,
13251    #[doc = "Current going to the UAV. If battery current not available this is the DC current from the generator. Positive for out. Negative for in. NaN: field not provided"]
13252    pub load_current: f32,
13253    #[doc = "The power being generated. NaN: field not provided"]
13254    pub power_generated: f32,
13255    #[doc = "Voltage of the bus seen at the generator, or battery bus if battery bus is controlled by generator and at a different voltage to main bus."]
13256    pub bus_voltage: f32,
13257    #[doc = "The target battery current. Positive for out. Negative for in. NaN: field not provided"]
13258    pub bat_current_setpoint: f32,
13259    #[doc = "Seconds this generator has run since it was rebooted. UINT32_MAX: field not provided."]
13260    pub runtime: u32,
13261    #[doc = "Seconds until this generator requires maintenance.  A negative value indicates maintenance is past-due. INT32_MAX: field not provided."]
13262    pub time_until_maintenance: i32,
13263    #[doc = "Speed of electrical generator or alternator. UINT16_MAX: field not provided."]
13264    pub generator_speed: u16,
13265    #[doc = "The temperature of the rectifier or power converter. INT16_MAX: field not provided."]
13266    pub rectifier_temperature: i16,
13267    #[doc = "The temperature of the mechanical motor, fuel cell core or generator. INT16_MAX: field not provided."]
13268    pub generator_temperature: i16,
13269}
13270impl GENERATOR_STATUS_DATA {
13271    pub const ENCODED_LEN: usize = 42usize;
13272    pub const DEFAULT: Self = Self {
13273        status: MavGeneratorStatusFlag::DEFAULT,
13274        battery_current: 0.0_f32,
13275        load_current: 0.0_f32,
13276        power_generated: 0.0_f32,
13277        bus_voltage: 0.0_f32,
13278        bat_current_setpoint: 0.0_f32,
13279        runtime: 0_u32,
13280        time_until_maintenance: 0_i32,
13281        generator_speed: 0_u16,
13282        rectifier_temperature: 0_i16,
13283        generator_temperature: 0_i16,
13284    };
13285    #[cfg(feature = "arbitrary")]
13286    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13287        use arbitrary::{Arbitrary, Unstructured};
13288        let mut buf = [0u8; 1024];
13289        rng.fill_bytes(&mut buf);
13290        let mut unstructured = Unstructured::new(&buf);
13291        Self::arbitrary(&mut unstructured).unwrap_or_default()
13292    }
13293}
13294impl Default for GENERATOR_STATUS_DATA {
13295    fn default() -> Self {
13296        Self::DEFAULT.clone()
13297    }
13298}
13299impl MessageData for GENERATOR_STATUS_DATA {
13300    type Message = MavMessage;
13301    const ID: u32 = 373u32;
13302    const NAME: &'static str = "GENERATOR_STATUS";
13303    const EXTRA_CRC: u8 = 117u8;
13304    const ENCODED_LEN: usize = 42usize;
13305    fn deser(
13306        _version: MavlinkVersion,
13307        __input: &[u8],
13308    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13309        let avail_len = __input.len();
13310        let mut payload_buf = [0; Self::ENCODED_LEN];
13311        let mut buf = if avail_len < Self::ENCODED_LEN {
13312            payload_buf[0..avail_len].copy_from_slice(__input);
13313            Bytes::new(&payload_buf)
13314        } else {
13315            Bytes::new(__input)
13316        };
13317        let mut __struct = Self::default();
13318        let tmp = buf.get_u64_le();
13319        __struct.status = MavGeneratorStatusFlag::from_bits(
13320            tmp & MavGeneratorStatusFlag::all().bits(),
13321        )
13322        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13323            flag_type: "MavGeneratorStatusFlag",
13324            value: tmp as u32,
13325        })?;
13326        __struct.battery_current = buf.get_f32_le();
13327        __struct.load_current = buf.get_f32_le();
13328        __struct.power_generated = buf.get_f32_le();
13329        __struct.bus_voltage = buf.get_f32_le();
13330        __struct.bat_current_setpoint = buf.get_f32_le();
13331        __struct.runtime = buf.get_u32_le();
13332        __struct.time_until_maintenance = buf.get_i32_le();
13333        __struct.generator_speed = buf.get_u16_le();
13334        __struct.rectifier_temperature = buf.get_i16_le();
13335        __struct.generator_temperature = buf.get_i16_le();
13336        Ok(__struct)
13337    }
13338    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13339        let mut __tmp = BytesMut::new(bytes);
13340        #[allow(clippy::absurd_extreme_comparisons)]
13341        #[allow(unused_comparisons)]
13342        if __tmp.remaining() < Self::ENCODED_LEN {
13343            panic!(
13344                "buffer is too small (need {} bytes, but got {})",
13345                Self::ENCODED_LEN,
13346                __tmp.remaining(),
13347            )
13348        }
13349        __tmp.put_u64_le(self.status.bits());
13350        __tmp.put_f32_le(self.battery_current);
13351        __tmp.put_f32_le(self.load_current);
13352        __tmp.put_f32_le(self.power_generated);
13353        __tmp.put_f32_le(self.bus_voltage);
13354        __tmp.put_f32_le(self.bat_current_setpoint);
13355        __tmp.put_u32_le(self.runtime);
13356        __tmp.put_i32_le(self.time_until_maintenance);
13357        __tmp.put_u16_le(self.generator_speed);
13358        __tmp.put_i16_le(self.rectifier_temperature);
13359        __tmp.put_i16_le(self.generator_temperature);
13360        if matches!(version, MavlinkVersion::V2) {
13361            let len = __tmp.len();
13362            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13363        } else {
13364            __tmp.len()
13365        }
13366    }
13367}
13368#[doc = "Message reporting the status of a gimbal device. \t  This message should be broadcast by a gimbal device component at a low regular rate (e.g. 5 Hz). \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Other conditions of the flags are not allowed. \t  The quaternion and angular velocities in the other frame can be calculated from delta_yaw and delta_yaw_velocity as \t  q_earth = q_delta_yaw * q_vehicle and w_earth = w_delta_yaw_velocity + w_vehicle (if not NaN). \t  If neither the GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME nor the GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME flag is set, \t  then (for backwards compatibility) the data in the delta_yaw and delta_yaw_velocity fields are to be ignored. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME, \t  and always should set delta_yaw and delta_yaw_velocity either to the proper value or NaN."]
13369#[doc = ""]
13370#[doc = "ID: 285"]
13371#[derive(Debug, Clone, PartialEq)]
13372#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13373#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13374#[cfg_attr(feature = "ts", derive(TS))]
13375#[cfg_attr(feature = "ts", ts(export))]
13376pub struct GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
13377    #[doc = "Timestamp (time since system boot)."]
13378    pub time_boot_ms: u32,
13379    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame is described in the message description."]
13380    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13381    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13382    pub q: [f32; 4],
13383    #[doc = "X component of angular velocity (positive: rolling to the right). The frame is described in the message description. NaN if unknown."]
13384    pub angular_velocity_x: f32,
13385    #[doc = "Y component of angular velocity (positive: pitching up). The frame is described in the message description. NaN if unknown."]
13386    pub angular_velocity_y: f32,
13387    #[doc = "Z component of angular velocity (positive: yawing to the right). The frame is described in the message description. NaN if unknown."]
13388    pub angular_velocity_z: f32,
13389    #[doc = "Failure flags (0 for no failure)"]
13390    pub failure_flags: GimbalDeviceErrorFlags,
13391    #[doc = "Current gimbal flags set."]
13392    pub flags: GimbalDeviceFlags,
13393    #[doc = "System ID"]
13394    pub target_system: u8,
13395    #[doc = "Component ID"]
13396    pub target_component: u8,
13397    #[doc = "Yaw angle relating the quaternions in earth and body frames (see message description). NaN if unknown."]
13398    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13399    pub delta_yaw: f32,
13400    #[doc = "Yaw angular velocity relating the angular velocities in earth and body frames (see message description). NaN if unknown."]
13401    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13402    pub delta_yaw_velocity: f32,
13403    #[doc = "This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set a number between 1-6. If the component ID is separate, this field is not required and must be set to 0."]
13404    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13405    pub gimbal_device_id: u8,
13406}
13407impl GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
13408    pub const ENCODED_LEN: usize = 49usize;
13409    pub const DEFAULT: Self = Self {
13410        time_boot_ms: 0_u32,
13411        q: [0.0_f32; 4usize],
13412        angular_velocity_x: 0.0_f32,
13413        angular_velocity_y: 0.0_f32,
13414        angular_velocity_z: 0.0_f32,
13415        failure_flags: GimbalDeviceErrorFlags::DEFAULT,
13416        flags: GimbalDeviceFlags::DEFAULT,
13417        target_system: 0_u8,
13418        target_component: 0_u8,
13419        delta_yaw: 0.0_f32,
13420        delta_yaw_velocity: 0.0_f32,
13421        gimbal_device_id: 0_u8,
13422    };
13423    #[cfg(feature = "arbitrary")]
13424    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13425        use arbitrary::{Arbitrary, Unstructured};
13426        let mut buf = [0u8; 1024];
13427        rng.fill_bytes(&mut buf);
13428        let mut unstructured = Unstructured::new(&buf);
13429        Self::arbitrary(&mut unstructured).unwrap_or_default()
13430    }
13431}
13432impl Default for GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
13433    fn default() -> Self {
13434        Self::DEFAULT.clone()
13435    }
13436}
13437impl MessageData for GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
13438    type Message = MavMessage;
13439    const ID: u32 = 285u32;
13440    const NAME: &'static str = "GIMBAL_DEVICE_ATTITUDE_STATUS";
13441    const EXTRA_CRC: u8 = 137u8;
13442    const ENCODED_LEN: usize = 49usize;
13443    fn deser(
13444        _version: MavlinkVersion,
13445        __input: &[u8],
13446    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13447        let avail_len = __input.len();
13448        let mut payload_buf = [0; Self::ENCODED_LEN];
13449        let mut buf = if avail_len < Self::ENCODED_LEN {
13450            payload_buf[0..avail_len].copy_from_slice(__input);
13451            Bytes::new(&payload_buf)
13452        } else {
13453            Bytes::new(__input)
13454        };
13455        let mut __struct = Self::default();
13456        __struct.time_boot_ms = buf.get_u32_le();
13457        for v in &mut __struct.q {
13458            let val = buf.get_f32_le();
13459            *v = val;
13460        }
13461        __struct.angular_velocity_x = buf.get_f32_le();
13462        __struct.angular_velocity_y = buf.get_f32_le();
13463        __struct.angular_velocity_z = buf.get_f32_le();
13464        let tmp = buf.get_u32_le();
13465        __struct.failure_flags = GimbalDeviceErrorFlags::from_bits(
13466            tmp & GimbalDeviceErrorFlags::all().bits(),
13467        )
13468        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13469            flag_type: "GimbalDeviceErrorFlags",
13470            value: tmp as u32,
13471        })?;
13472        let tmp = buf.get_u16_le();
13473        __struct.flags = GimbalDeviceFlags::from_bits(tmp & GimbalDeviceFlags::all().bits())
13474            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13475                flag_type: "GimbalDeviceFlags",
13476                value: tmp as u32,
13477            })?;
13478        __struct.target_system = buf.get_u8();
13479        __struct.target_component = buf.get_u8();
13480        __struct.delta_yaw = buf.get_f32_le();
13481        __struct.delta_yaw_velocity = buf.get_f32_le();
13482        __struct.gimbal_device_id = buf.get_u8();
13483        Ok(__struct)
13484    }
13485    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13486        let mut __tmp = BytesMut::new(bytes);
13487        #[allow(clippy::absurd_extreme_comparisons)]
13488        #[allow(unused_comparisons)]
13489        if __tmp.remaining() < Self::ENCODED_LEN {
13490            panic!(
13491                "buffer is too small (need {} bytes, but got {})",
13492                Self::ENCODED_LEN,
13493                __tmp.remaining(),
13494            )
13495        }
13496        __tmp.put_u32_le(self.time_boot_ms);
13497        for val in &self.q {
13498            __tmp.put_f32_le(*val);
13499        }
13500        __tmp.put_f32_le(self.angular_velocity_x);
13501        __tmp.put_f32_le(self.angular_velocity_y);
13502        __tmp.put_f32_le(self.angular_velocity_z);
13503        __tmp.put_u32_le(self.failure_flags.bits());
13504        __tmp.put_u16_le(self.flags.bits());
13505        __tmp.put_u8(self.target_system);
13506        __tmp.put_u8(self.target_component);
13507        if matches!(version, MavlinkVersion::V2) {
13508            __tmp.put_f32_le(self.delta_yaw);
13509            __tmp.put_f32_le(self.delta_yaw_velocity);
13510            __tmp.put_u8(self.gimbal_device_id);
13511            let len = __tmp.len();
13512            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13513        } else {
13514            __tmp.len()
13515        }
13516    }
13517}
13518#[doc = "Information about a low level gimbal. This message should be requested by the gimbal manager or a ground station using MAV_CMD_REQUEST_MESSAGE. The maximum angles and rates are the limits by hardware. However, the limits by software used are likely different/smaller and dependent on mode/settings/etc.."]
13519#[doc = ""]
13520#[doc = "ID: 283"]
13521#[derive(Debug, Clone, PartialEq)]
13522#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13523#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13524#[cfg_attr(feature = "ts", derive(TS))]
13525#[cfg_attr(feature = "ts", ts(export))]
13526pub struct GIMBAL_DEVICE_INFORMATION_DATA {
13527    #[doc = "UID of gimbal hardware (0 if unknown)."]
13528    pub uid: u64,
13529    #[doc = "Timestamp (time since system boot)."]
13530    pub time_boot_ms: u32,
13531    #[doc = "0xff)."]
13532    pub firmware_version: u32,
13533    #[doc = "0xff)."]
13534    pub hardware_version: u32,
13535    #[doc = "Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown."]
13536    pub roll_min: f32,
13537    #[doc = "Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown."]
13538    pub roll_max: f32,
13539    #[doc = "Minimum hardware pitch angle (positive: up, negative: down). NAN if unknown."]
13540    pub pitch_min: f32,
13541    #[doc = "Maximum hardware pitch angle (positive: up, negative: down). NAN if unknown."]
13542    pub pitch_max: f32,
13543    #[doc = "Minimum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown."]
13544    pub yaw_min: f32,
13545    #[doc = "Maximum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown."]
13546    pub yaw_max: f32,
13547    #[doc = "Bitmap of gimbal capability flags."]
13548    pub cap_flags: GimbalDeviceCapFlags,
13549    #[doc = "Bitmap for use for gimbal-specific capability flags."]
13550    pub custom_cap_flags: u16,
13551    #[doc = "Name of the gimbal vendor."]
13552    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13553    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13554    pub vendor_name: [u8; 32],
13555    #[doc = "Name of the gimbal model."]
13556    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13557    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13558    pub model_name: [u8; 32],
13559    #[doc = "Custom name of the gimbal given to it by the user."]
13560    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13561    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13562    pub custom_name: [u8; 32],
13563    #[doc = "This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set to a number between 1-6. If the component ID is separate, this field is not required and must be set to 0."]
13564    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13565    pub gimbal_device_id: u8,
13566}
13567impl GIMBAL_DEVICE_INFORMATION_DATA {
13568    pub const ENCODED_LEN: usize = 145usize;
13569    pub const DEFAULT: Self = Self {
13570        uid: 0_u64,
13571        time_boot_ms: 0_u32,
13572        firmware_version: 0_u32,
13573        hardware_version: 0_u32,
13574        roll_min: 0.0_f32,
13575        roll_max: 0.0_f32,
13576        pitch_min: 0.0_f32,
13577        pitch_max: 0.0_f32,
13578        yaw_min: 0.0_f32,
13579        yaw_max: 0.0_f32,
13580        cap_flags: GimbalDeviceCapFlags::DEFAULT,
13581        custom_cap_flags: 0_u16,
13582        vendor_name: [0_u8; 32usize],
13583        model_name: [0_u8; 32usize],
13584        custom_name: [0_u8; 32usize],
13585        gimbal_device_id: 0_u8,
13586    };
13587    #[cfg(feature = "arbitrary")]
13588    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13589        use arbitrary::{Arbitrary, Unstructured};
13590        let mut buf = [0u8; 1024];
13591        rng.fill_bytes(&mut buf);
13592        let mut unstructured = Unstructured::new(&buf);
13593        Self::arbitrary(&mut unstructured).unwrap_or_default()
13594    }
13595}
13596impl Default for GIMBAL_DEVICE_INFORMATION_DATA {
13597    fn default() -> Self {
13598        Self::DEFAULT.clone()
13599    }
13600}
13601impl MessageData for GIMBAL_DEVICE_INFORMATION_DATA {
13602    type Message = MavMessage;
13603    const ID: u32 = 283u32;
13604    const NAME: &'static str = "GIMBAL_DEVICE_INFORMATION";
13605    const EXTRA_CRC: u8 = 74u8;
13606    const ENCODED_LEN: usize = 145usize;
13607    fn deser(
13608        _version: MavlinkVersion,
13609        __input: &[u8],
13610    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13611        let avail_len = __input.len();
13612        let mut payload_buf = [0; Self::ENCODED_LEN];
13613        let mut buf = if avail_len < Self::ENCODED_LEN {
13614            payload_buf[0..avail_len].copy_from_slice(__input);
13615            Bytes::new(&payload_buf)
13616        } else {
13617            Bytes::new(__input)
13618        };
13619        let mut __struct = Self::default();
13620        __struct.uid = buf.get_u64_le();
13621        __struct.time_boot_ms = buf.get_u32_le();
13622        __struct.firmware_version = buf.get_u32_le();
13623        __struct.hardware_version = buf.get_u32_le();
13624        __struct.roll_min = buf.get_f32_le();
13625        __struct.roll_max = buf.get_f32_le();
13626        __struct.pitch_min = buf.get_f32_le();
13627        __struct.pitch_max = buf.get_f32_le();
13628        __struct.yaw_min = buf.get_f32_le();
13629        __struct.yaw_max = buf.get_f32_le();
13630        let tmp = buf.get_u16_le();
13631        __struct.cap_flags = GimbalDeviceCapFlags::from_bits(
13632            tmp & GimbalDeviceCapFlags::all().bits(),
13633        )
13634        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13635            flag_type: "GimbalDeviceCapFlags",
13636            value: tmp as u32,
13637        })?;
13638        __struct.custom_cap_flags = buf.get_u16_le();
13639        for v in &mut __struct.vendor_name {
13640            let val = buf.get_u8();
13641            *v = val;
13642        }
13643        for v in &mut __struct.model_name {
13644            let val = buf.get_u8();
13645            *v = val;
13646        }
13647        for v in &mut __struct.custom_name {
13648            let val = buf.get_u8();
13649            *v = val;
13650        }
13651        __struct.gimbal_device_id = buf.get_u8();
13652        Ok(__struct)
13653    }
13654    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13655        let mut __tmp = BytesMut::new(bytes);
13656        #[allow(clippy::absurd_extreme_comparisons)]
13657        #[allow(unused_comparisons)]
13658        if __tmp.remaining() < Self::ENCODED_LEN {
13659            panic!(
13660                "buffer is too small (need {} bytes, but got {})",
13661                Self::ENCODED_LEN,
13662                __tmp.remaining(),
13663            )
13664        }
13665        __tmp.put_u64_le(self.uid);
13666        __tmp.put_u32_le(self.time_boot_ms);
13667        __tmp.put_u32_le(self.firmware_version);
13668        __tmp.put_u32_le(self.hardware_version);
13669        __tmp.put_f32_le(self.roll_min);
13670        __tmp.put_f32_le(self.roll_max);
13671        __tmp.put_f32_le(self.pitch_min);
13672        __tmp.put_f32_le(self.pitch_max);
13673        __tmp.put_f32_le(self.yaw_min);
13674        __tmp.put_f32_le(self.yaw_max);
13675        __tmp.put_u16_le(self.cap_flags.bits());
13676        __tmp.put_u16_le(self.custom_cap_flags);
13677        for val in &self.vendor_name {
13678            __tmp.put_u8(*val);
13679        }
13680        for val in &self.model_name {
13681            __tmp.put_u8(*val);
13682        }
13683        for val in &self.custom_name {
13684            __tmp.put_u8(*val);
13685        }
13686        if matches!(version, MavlinkVersion::V2) {
13687            __tmp.put_u8(self.gimbal_device_id);
13688            let len = __tmp.len();
13689            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13690        } else {
13691            __tmp.len()
13692        }
13693    }
13694}
13695#[doc = "Low level message to control a gimbal device's attitude. \t  This message is to be sent from the gimbal manager to the gimbal device component. \t  The quaternion and angular velocities can be set to NaN according to use case. \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Setting both GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME and GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is not allowed. \t  These rules are to ensure backwards compatibility. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."]
13696#[doc = ""]
13697#[doc = "ID: 284"]
13698#[derive(Debug, Clone, PartialEq)]
13699#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13700#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13701#[cfg_attr(feature = "ts", derive(TS))]
13702#[cfg_attr(feature = "ts", ts(export))]
13703pub struct GIMBAL_DEVICE_SET_ATTITUDE_DATA {
13704    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame is described in the message description. Set fields to NaN to be ignored."]
13705    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13706    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13707    pub q: [f32; 4],
13708    #[doc = "X component of angular velocity (positive: rolling to the right). The frame is described in the message description. NaN to be ignored."]
13709    pub angular_velocity_x: f32,
13710    #[doc = "Y component of angular velocity (positive: pitching up). The frame is described in the message description. NaN to be ignored."]
13711    pub angular_velocity_y: f32,
13712    #[doc = "Z component of angular velocity (positive: yawing to the right). The frame is described in the message description. NaN to be ignored."]
13713    pub angular_velocity_z: f32,
13714    #[doc = "Low level gimbal flags."]
13715    pub flags: GimbalDeviceFlags,
13716    #[doc = "System ID"]
13717    pub target_system: u8,
13718    #[doc = "Component ID"]
13719    pub target_component: u8,
13720}
13721impl GIMBAL_DEVICE_SET_ATTITUDE_DATA {
13722    pub const ENCODED_LEN: usize = 32usize;
13723    pub const DEFAULT: Self = Self {
13724        q: [0.0_f32; 4usize],
13725        angular_velocity_x: 0.0_f32,
13726        angular_velocity_y: 0.0_f32,
13727        angular_velocity_z: 0.0_f32,
13728        flags: GimbalDeviceFlags::DEFAULT,
13729        target_system: 0_u8,
13730        target_component: 0_u8,
13731    };
13732    #[cfg(feature = "arbitrary")]
13733    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13734        use arbitrary::{Arbitrary, Unstructured};
13735        let mut buf = [0u8; 1024];
13736        rng.fill_bytes(&mut buf);
13737        let mut unstructured = Unstructured::new(&buf);
13738        Self::arbitrary(&mut unstructured).unwrap_or_default()
13739    }
13740}
13741impl Default for GIMBAL_DEVICE_SET_ATTITUDE_DATA {
13742    fn default() -> Self {
13743        Self::DEFAULT.clone()
13744    }
13745}
13746impl MessageData for GIMBAL_DEVICE_SET_ATTITUDE_DATA {
13747    type Message = MavMessage;
13748    const ID: u32 = 284u32;
13749    const NAME: &'static str = "GIMBAL_DEVICE_SET_ATTITUDE";
13750    const EXTRA_CRC: u8 = 99u8;
13751    const ENCODED_LEN: usize = 32usize;
13752    fn deser(
13753        _version: MavlinkVersion,
13754        __input: &[u8],
13755    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13756        let avail_len = __input.len();
13757        let mut payload_buf = [0; Self::ENCODED_LEN];
13758        let mut buf = if avail_len < Self::ENCODED_LEN {
13759            payload_buf[0..avail_len].copy_from_slice(__input);
13760            Bytes::new(&payload_buf)
13761        } else {
13762            Bytes::new(__input)
13763        };
13764        let mut __struct = Self::default();
13765        for v in &mut __struct.q {
13766            let val = buf.get_f32_le();
13767            *v = val;
13768        }
13769        __struct.angular_velocity_x = buf.get_f32_le();
13770        __struct.angular_velocity_y = buf.get_f32_le();
13771        __struct.angular_velocity_z = buf.get_f32_le();
13772        let tmp = buf.get_u16_le();
13773        __struct.flags = GimbalDeviceFlags::from_bits(tmp & GimbalDeviceFlags::all().bits())
13774            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13775                flag_type: "GimbalDeviceFlags",
13776                value: tmp as u32,
13777            })?;
13778        __struct.target_system = buf.get_u8();
13779        __struct.target_component = buf.get_u8();
13780        Ok(__struct)
13781    }
13782    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13783        let mut __tmp = BytesMut::new(bytes);
13784        #[allow(clippy::absurd_extreme_comparisons)]
13785        #[allow(unused_comparisons)]
13786        if __tmp.remaining() < Self::ENCODED_LEN {
13787            panic!(
13788                "buffer is too small (need {} bytes, but got {})",
13789                Self::ENCODED_LEN,
13790                __tmp.remaining(),
13791            )
13792        }
13793        for val in &self.q {
13794            __tmp.put_f32_le(*val);
13795        }
13796        __tmp.put_f32_le(self.angular_velocity_x);
13797        __tmp.put_f32_le(self.angular_velocity_y);
13798        __tmp.put_f32_le(self.angular_velocity_z);
13799        __tmp.put_u16_le(self.flags.bits());
13800        __tmp.put_u8(self.target_system);
13801        __tmp.put_u8(self.target_component);
13802        if matches!(version, MavlinkVersion::V2) {
13803            let len = __tmp.len();
13804            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13805        } else {
13806            __tmp.len()
13807        }
13808    }
13809}
13810#[doc = "Information about a high level gimbal manager. This message should be requested by a ground station using MAV_CMD_REQUEST_MESSAGE."]
13811#[doc = ""]
13812#[doc = "ID: 280"]
13813#[derive(Debug, Clone, PartialEq)]
13814#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13815#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13816#[cfg_attr(feature = "ts", derive(TS))]
13817#[cfg_attr(feature = "ts", ts(export))]
13818pub struct GIMBAL_MANAGER_INFORMATION_DATA {
13819    #[doc = "Timestamp (time since system boot)."]
13820    pub time_boot_ms: u32,
13821    #[doc = "Bitmap of gimbal capability flags."]
13822    pub cap_flags: GimbalManagerCapFlags,
13823    #[doc = "Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left)"]
13824    pub roll_min: f32,
13825    #[doc = "Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left)"]
13826    pub roll_max: f32,
13827    #[doc = "Minimum pitch angle (positive: up, negative: down)"]
13828    pub pitch_min: f32,
13829    #[doc = "Maximum pitch angle (positive: up, negative: down)"]
13830    pub pitch_max: f32,
13831    #[doc = "Minimum yaw angle (positive: to the right, negative: to the left)"]
13832    pub yaw_min: f32,
13833    #[doc = "Maximum yaw angle (positive: to the right, negative: to the left)"]
13834    pub yaw_max: f32,
13835    #[doc = "Gimbal device ID that this gimbal manager is responsible for. Component ID of gimbal device (or 1-6 for non-MAVLink gimbal)."]
13836    pub gimbal_device_id: u8,
13837}
13838impl GIMBAL_MANAGER_INFORMATION_DATA {
13839    pub const ENCODED_LEN: usize = 33usize;
13840    pub const DEFAULT: Self = Self {
13841        time_boot_ms: 0_u32,
13842        cap_flags: GimbalManagerCapFlags::DEFAULT,
13843        roll_min: 0.0_f32,
13844        roll_max: 0.0_f32,
13845        pitch_min: 0.0_f32,
13846        pitch_max: 0.0_f32,
13847        yaw_min: 0.0_f32,
13848        yaw_max: 0.0_f32,
13849        gimbal_device_id: 0_u8,
13850    };
13851    #[cfg(feature = "arbitrary")]
13852    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13853        use arbitrary::{Arbitrary, Unstructured};
13854        let mut buf = [0u8; 1024];
13855        rng.fill_bytes(&mut buf);
13856        let mut unstructured = Unstructured::new(&buf);
13857        Self::arbitrary(&mut unstructured).unwrap_or_default()
13858    }
13859}
13860impl Default for GIMBAL_MANAGER_INFORMATION_DATA {
13861    fn default() -> Self {
13862        Self::DEFAULT.clone()
13863    }
13864}
13865impl MessageData for GIMBAL_MANAGER_INFORMATION_DATA {
13866    type Message = MavMessage;
13867    const ID: u32 = 280u32;
13868    const NAME: &'static str = "GIMBAL_MANAGER_INFORMATION";
13869    const EXTRA_CRC: u8 = 70u8;
13870    const ENCODED_LEN: usize = 33usize;
13871    fn deser(
13872        _version: MavlinkVersion,
13873        __input: &[u8],
13874    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13875        let avail_len = __input.len();
13876        let mut payload_buf = [0; Self::ENCODED_LEN];
13877        let mut buf = if avail_len < Self::ENCODED_LEN {
13878            payload_buf[0..avail_len].copy_from_slice(__input);
13879            Bytes::new(&payload_buf)
13880        } else {
13881            Bytes::new(__input)
13882        };
13883        let mut __struct = Self::default();
13884        __struct.time_boot_ms = buf.get_u32_le();
13885        let tmp = buf.get_u32_le();
13886        __struct.cap_flags = GimbalManagerCapFlags::from_bits(
13887            tmp & GimbalManagerCapFlags::all().bits(),
13888        )
13889        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13890            flag_type: "GimbalManagerCapFlags",
13891            value: tmp as u32,
13892        })?;
13893        __struct.roll_min = buf.get_f32_le();
13894        __struct.roll_max = buf.get_f32_le();
13895        __struct.pitch_min = buf.get_f32_le();
13896        __struct.pitch_max = buf.get_f32_le();
13897        __struct.yaw_min = buf.get_f32_le();
13898        __struct.yaw_max = buf.get_f32_le();
13899        __struct.gimbal_device_id = buf.get_u8();
13900        Ok(__struct)
13901    }
13902    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13903        let mut __tmp = BytesMut::new(bytes);
13904        #[allow(clippy::absurd_extreme_comparisons)]
13905        #[allow(unused_comparisons)]
13906        if __tmp.remaining() < Self::ENCODED_LEN {
13907            panic!(
13908                "buffer is too small (need {} bytes, but got {})",
13909                Self::ENCODED_LEN,
13910                __tmp.remaining(),
13911            )
13912        }
13913        __tmp.put_u32_le(self.time_boot_ms);
13914        __tmp.put_u32_le(self.cap_flags.bits());
13915        __tmp.put_f32_le(self.roll_min);
13916        __tmp.put_f32_le(self.roll_max);
13917        __tmp.put_f32_le(self.pitch_min);
13918        __tmp.put_f32_le(self.pitch_max);
13919        __tmp.put_f32_le(self.yaw_min);
13920        __tmp.put_f32_le(self.yaw_max);
13921        __tmp.put_u8(self.gimbal_device_id);
13922        if matches!(version, MavlinkVersion::V2) {
13923            let len = __tmp.len();
13924            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13925        } else {
13926            __tmp.len()
13927        }
13928    }
13929}
13930#[doc = "High level message to control a gimbal's attitude. This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
13931#[doc = ""]
13932#[doc = "ID: 282"]
13933#[derive(Debug, Clone, PartialEq)]
13934#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13935#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13936#[cfg_attr(feature = "ts", derive(TS))]
13937#[cfg_attr(feature = "ts", ts(export))]
13938pub struct GIMBAL_MANAGER_SET_ATTITUDE_DATA {
13939    #[doc = "High level gimbal manager flags to use."]
13940    pub flags: GimbalManagerFlags,
13941    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation, the frame is depends on whether the flag GIMBAL_MANAGER_FLAGS_YAW_LOCK is set)"]
13942    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13943    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13944    pub q: [f32; 4],
13945    #[doc = "X component of angular velocity, positive is rolling to the right, NaN to be ignored."]
13946    pub angular_velocity_x: f32,
13947    #[doc = "Y component of angular velocity, positive is pitching up, NaN to be ignored."]
13948    pub angular_velocity_y: f32,
13949    #[doc = "Z component of angular velocity, positive is yawing to the right, NaN to be ignored."]
13950    pub angular_velocity_z: f32,
13951    #[doc = "System ID"]
13952    pub target_system: u8,
13953    #[doc = "Component ID"]
13954    pub target_component: u8,
13955    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
13956    pub gimbal_device_id: u8,
13957}
13958impl GIMBAL_MANAGER_SET_ATTITUDE_DATA {
13959    pub const ENCODED_LEN: usize = 35usize;
13960    pub const DEFAULT: Self = Self {
13961        flags: GimbalManagerFlags::DEFAULT,
13962        q: [0.0_f32; 4usize],
13963        angular_velocity_x: 0.0_f32,
13964        angular_velocity_y: 0.0_f32,
13965        angular_velocity_z: 0.0_f32,
13966        target_system: 0_u8,
13967        target_component: 0_u8,
13968        gimbal_device_id: 0_u8,
13969    };
13970    #[cfg(feature = "arbitrary")]
13971    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13972        use arbitrary::{Arbitrary, Unstructured};
13973        let mut buf = [0u8; 1024];
13974        rng.fill_bytes(&mut buf);
13975        let mut unstructured = Unstructured::new(&buf);
13976        Self::arbitrary(&mut unstructured).unwrap_or_default()
13977    }
13978}
13979impl Default for GIMBAL_MANAGER_SET_ATTITUDE_DATA {
13980    fn default() -> Self {
13981        Self::DEFAULT.clone()
13982    }
13983}
13984impl MessageData for GIMBAL_MANAGER_SET_ATTITUDE_DATA {
13985    type Message = MavMessage;
13986    const ID: u32 = 282u32;
13987    const NAME: &'static str = "GIMBAL_MANAGER_SET_ATTITUDE";
13988    const EXTRA_CRC: u8 = 123u8;
13989    const ENCODED_LEN: usize = 35usize;
13990    fn deser(
13991        _version: MavlinkVersion,
13992        __input: &[u8],
13993    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13994        let avail_len = __input.len();
13995        let mut payload_buf = [0; Self::ENCODED_LEN];
13996        let mut buf = if avail_len < Self::ENCODED_LEN {
13997            payload_buf[0..avail_len].copy_from_slice(__input);
13998            Bytes::new(&payload_buf)
13999        } else {
14000            Bytes::new(__input)
14001        };
14002        let mut __struct = Self::default();
14003        let tmp = buf.get_u32_le();
14004        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
14005            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
14006                flag_type: "GimbalManagerFlags",
14007                value: tmp as u32,
14008            })?;
14009        for v in &mut __struct.q {
14010            let val = buf.get_f32_le();
14011            *v = val;
14012        }
14013        __struct.angular_velocity_x = buf.get_f32_le();
14014        __struct.angular_velocity_y = buf.get_f32_le();
14015        __struct.angular_velocity_z = buf.get_f32_le();
14016        __struct.target_system = buf.get_u8();
14017        __struct.target_component = buf.get_u8();
14018        __struct.gimbal_device_id = buf.get_u8();
14019        Ok(__struct)
14020    }
14021    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14022        let mut __tmp = BytesMut::new(bytes);
14023        #[allow(clippy::absurd_extreme_comparisons)]
14024        #[allow(unused_comparisons)]
14025        if __tmp.remaining() < Self::ENCODED_LEN {
14026            panic!(
14027                "buffer is too small (need {} bytes, but got {})",
14028                Self::ENCODED_LEN,
14029                __tmp.remaining(),
14030            )
14031        }
14032        __tmp.put_u32_le(self.flags.bits());
14033        for val in &self.q {
14034            __tmp.put_f32_le(*val);
14035        }
14036        __tmp.put_f32_le(self.angular_velocity_x);
14037        __tmp.put_f32_le(self.angular_velocity_y);
14038        __tmp.put_f32_le(self.angular_velocity_z);
14039        __tmp.put_u8(self.target_system);
14040        __tmp.put_u8(self.target_component);
14041        __tmp.put_u8(self.gimbal_device_id);
14042        if matches!(version, MavlinkVersion::V2) {
14043            let len = __tmp.len();
14044            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14045        } else {
14046            __tmp.len()
14047        }
14048    }
14049}
14050#[doc = "High level message to control a gimbal manually. The angles or angular rates are unitless; the actual rates will depend on internal gimbal manager settings/configuration (e.g. set by parameters). This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
14051#[doc = ""]
14052#[doc = "ID: 288"]
14053#[derive(Debug, Clone, PartialEq)]
14054#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14055#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14056#[cfg_attr(feature = "ts", derive(TS))]
14057#[cfg_attr(feature = "ts", ts(export))]
14058pub struct GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
14059    #[doc = "High level gimbal manager flags."]
14060    pub flags: GimbalManagerFlags,
14061    #[doc = "Pitch angle unitless (-1..1, positive: up, negative: down, NaN to be ignored)."]
14062    pub pitch: f32,
14063    #[doc = "Yaw angle unitless (-1..1, positive: to the right, negative: to the left, NaN to be ignored)."]
14064    pub yaw: f32,
14065    #[doc = "Pitch angular rate unitless (-1..1, positive: up, negative: down, NaN to be ignored)."]
14066    pub pitch_rate: f32,
14067    #[doc = "Yaw angular rate unitless (-1..1, positive: to the right, negative: to the left, NaN to be ignored)."]
14068    pub yaw_rate: f32,
14069    #[doc = "System ID"]
14070    pub target_system: u8,
14071    #[doc = "Component ID"]
14072    pub target_component: u8,
14073    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
14074    pub gimbal_device_id: u8,
14075}
14076impl GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
14077    pub const ENCODED_LEN: usize = 23usize;
14078    pub const DEFAULT: Self = Self {
14079        flags: GimbalManagerFlags::DEFAULT,
14080        pitch: 0.0_f32,
14081        yaw: 0.0_f32,
14082        pitch_rate: 0.0_f32,
14083        yaw_rate: 0.0_f32,
14084        target_system: 0_u8,
14085        target_component: 0_u8,
14086        gimbal_device_id: 0_u8,
14087    };
14088    #[cfg(feature = "arbitrary")]
14089    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14090        use arbitrary::{Arbitrary, Unstructured};
14091        let mut buf = [0u8; 1024];
14092        rng.fill_bytes(&mut buf);
14093        let mut unstructured = Unstructured::new(&buf);
14094        Self::arbitrary(&mut unstructured).unwrap_or_default()
14095    }
14096}
14097impl Default for GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
14098    fn default() -> Self {
14099        Self::DEFAULT.clone()
14100    }
14101}
14102impl MessageData for GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
14103    type Message = MavMessage;
14104    const ID: u32 = 288u32;
14105    const NAME: &'static str = "GIMBAL_MANAGER_SET_MANUAL_CONTROL";
14106    const EXTRA_CRC: u8 = 20u8;
14107    const ENCODED_LEN: usize = 23usize;
14108    fn deser(
14109        _version: MavlinkVersion,
14110        __input: &[u8],
14111    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14112        let avail_len = __input.len();
14113        let mut payload_buf = [0; Self::ENCODED_LEN];
14114        let mut buf = if avail_len < Self::ENCODED_LEN {
14115            payload_buf[0..avail_len].copy_from_slice(__input);
14116            Bytes::new(&payload_buf)
14117        } else {
14118            Bytes::new(__input)
14119        };
14120        let mut __struct = Self::default();
14121        let tmp = buf.get_u32_le();
14122        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
14123            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
14124                flag_type: "GimbalManagerFlags",
14125                value: tmp as u32,
14126            })?;
14127        __struct.pitch = buf.get_f32_le();
14128        __struct.yaw = buf.get_f32_le();
14129        __struct.pitch_rate = buf.get_f32_le();
14130        __struct.yaw_rate = buf.get_f32_le();
14131        __struct.target_system = buf.get_u8();
14132        __struct.target_component = buf.get_u8();
14133        __struct.gimbal_device_id = buf.get_u8();
14134        Ok(__struct)
14135    }
14136    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14137        let mut __tmp = BytesMut::new(bytes);
14138        #[allow(clippy::absurd_extreme_comparisons)]
14139        #[allow(unused_comparisons)]
14140        if __tmp.remaining() < Self::ENCODED_LEN {
14141            panic!(
14142                "buffer is too small (need {} bytes, but got {})",
14143                Self::ENCODED_LEN,
14144                __tmp.remaining(),
14145            )
14146        }
14147        __tmp.put_u32_le(self.flags.bits());
14148        __tmp.put_f32_le(self.pitch);
14149        __tmp.put_f32_le(self.yaw);
14150        __tmp.put_f32_le(self.pitch_rate);
14151        __tmp.put_f32_le(self.yaw_rate);
14152        __tmp.put_u8(self.target_system);
14153        __tmp.put_u8(self.target_component);
14154        __tmp.put_u8(self.gimbal_device_id);
14155        if matches!(version, MavlinkVersion::V2) {
14156            let len = __tmp.len();
14157            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14158        } else {
14159            __tmp.len()
14160        }
14161    }
14162}
14163#[doc = "Set gimbal manager pitch and yaw angles (high rate message). This message is to be sent to the gimbal manager (e.g. from a ground station) and will be ignored by gimbal devices. Angles and rates can be set to NaN according to use case. Use MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW for low-rate adjustments that require confirmation."]
14164#[doc = ""]
14165#[doc = "ID: 287"]
14166#[derive(Debug, Clone, PartialEq)]
14167#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14168#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14169#[cfg_attr(feature = "ts", derive(TS))]
14170#[cfg_attr(feature = "ts", ts(export))]
14171pub struct GIMBAL_MANAGER_SET_PITCHYAW_DATA {
14172    #[doc = "High level gimbal manager flags to use."]
14173    pub flags: GimbalManagerFlags,
14174    #[doc = "Pitch angle (positive: up, negative: down, NaN to be ignored)."]
14175    pub pitch: f32,
14176    #[doc = "Yaw angle (positive: to the right, negative: to the left, NaN to be ignored)."]
14177    pub yaw: f32,
14178    #[doc = "Pitch angular rate (positive: up, negative: down, NaN to be ignored)."]
14179    pub pitch_rate: f32,
14180    #[doc = "Yaw angular rate (positive: to the right, negative: to the left, NaN to be ignored)."]
14181    pub yaw_rate: f32,
14182    #[doc = "System ID"]
14183    pub target_system: u8,
14184    #[doc = "Component ID"]
14185    pub target_component: u8,
14186    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
14187    pub gimbal_device_id: u8,
14188}
14189impl GIMBAL_MANAGER_SET_PITCHYAW_DATA {
14190    pub const ENCODED_LEN: usize = 23usize;
14191    pub const DEFAULT: Self = Self {
14192        flags: GimbalManagerFlags::DEFAULT,
14193        pitch: 0.0_f32,
14194        yaw: 0.0_f32,
14195        pitch_rate: 0.0_f32,
14196        yaw_rate: 0.0_f32,
14197        target_system: 0_u8,
14198        target_component: 0_u8,
14199        gimbal_device_id: 0_u8,
14200    };
14201    #[cfg(feature = "arbitrary")]
14202    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14203        use arbitrary::{Arbitrary, Unstructured};
14204        let mut buf = [0u8; 1024];
14205        rng.fill_bytes(&mut buf);
14206        let mut unstructured = Unstructured::new(&buf);
14207        Self::arbitrary(&mut unstructured).unwrap_or_default()
14208    }
14209}
14210impl Default for GIMBAL_MANAGER_SET_PITCHYAW_DATA {
14211    fn default() -> Self {
14212        Self::DEFAULT.clone()
14213    }
14214}
14215impl MessageData for GIMBAL_MANAGER_SET_PITCHYAW_DATA {
14216    type Message = MavMessage;
14217    const ID: u32 = 287u32;
14218    const NAME: &'static str = "GIMBAL_MANAGER_SET_PITCHYAW";
14219    const EXTRA_CRC: u8 = 1u8;
14220    const ENCODED_LEN: usize = 23usize;
14221    fn deser(
14222        _version: MavlinkVersion,
14223        __input: &[u8],
14224    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14225        let avail_len = __input.len();
14226        let mut payload_buf = [0; Self::ENCODED_LEN];
14227        let mut buf = if avail_len < Self::ENCODED_LEN {
14228            payload_buf[0..avail_len].copy_from_slice(__input);
14229            Bytes::new(&payload_buf)
14230        } else {
14231            Bytes::new(__input)
14232        };
14233        let mut __struct = Self::default();
14234        let tmp = buf.get_u32_le();
14235        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
14236            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
14237                flag_type: "GimbalManagerFlags",
14238                value: tmp as u32,
14239            })?;
14240        __struct.pitch = buf.get_f32_le();
14241        __struct.yaw = buf.get_f32_le();
14242        __struct.pitch_rate = buf.get_f32_le();
14243        __struct.yaw_rate = buf.get_f32_le();
14244        __struct.target_system = buf.get_u8();
14245        __struct.target_component = buf.get_u8();
14246        __struct.gimbal_device_id = buf.get_u8();
14247        Ok(__struct)
14248    }
14249    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14250        let mut __tmp = BytesMut::new(bytes);
14251        #[allow(clippy::absurd_extreme_comparisons)]
14252        #[allow(unused_comparisons)]
14253        if __tmp.remaining() < Self::ENCODED_LEN {
14254            panic!(
14255                "buffer is too small (need {} bytes, but got {})",
14256                Self::ENCODED_LEN,
14257                __tmp.remaining(),
14258            )
14259        }
14260        __tmp.put_u32_le(self.flags.bits());
14261        __tmp.put_f32_le(self.pitch);
14262        __tmp.put_f32_le(self.yaw);
14263        __tmp.put_f32_le(self.pitch_rate);
14264        __tmp.put_f32_le(self.yaw_rate);
14265        __tmp.put_u8(self.target_system);
14266        __tmp.put_u8(self.target_component);
14267        __tmp.put_u8(self.gimbal_device_id);
14268        if matches!(version, MavlinkVersion::V2) {
14269            let len = __tmp.len();
14270            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14271        } else {
14272            __tmp.len()
14273        }
14274    }
14275}
14276#[doc = "Current status about a high level gimbal manager. This message should be broadcast at a low regular rate (e.g. 5Hz)."]
14277#[doc = ""]
14278#[doc = "ID: 281"]
14279#[derive(Debug, Clone, PartialEq)]
14280#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14281#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14282#[cfg_attr(feature = "ts", derive(TS))]
14283#[cfg_attr(feature = "ts", ts(export))]
14284pub struct GIMBAL_MANAGER_STATUS_DATA {
14285    #[doc = "Timestamp (time since system boot)."]
14286    pub time_boot_ms: u32,
14287    #[doc = "High level gimbal manager flags currently applied."]
14288    pub flags: GimbalManagerFlags,
14289    #[doc = "Gimbal device ID that this gimbal manager is responsible for. Component ID of gimbal device (or 1-6 for non-MAVLink gimbal)."]
14290    pub gimbal_device_id: u8,
14291    #[doc = "System ID of MAVLink component with primary control, 0 for none."]
14292    pub primary_control_sysid: u8,
14293    #[doc = "Component ID of MAVLink component with primary control, 0 for none."]
14294    pub primary_control_compid: u8,
14295    #[doc = "System ID of MAVLink component with secondary control, 0 for none."]
14296    pub secondary_control_sysid: u8,
14297    #[doc = "Component ID of MAVLink component with secondary control, 0 for none."]
14298    pub secondary_control_compid: u8,
14299}
14300impl GIMBAL_MANAGER_STATUS_DATA {
14301    pub const ENCODED_LEN: usize = 13usize;
14302    pub const DEFAULT: Self = Self {
14303        time_boot_ms: 0_u32,
14304        flags: GimbalManagerFlags::DEFAULT,
14305        gimbal_device_id: 0_u8,
14306        primary_control_sysid: 0_u8,
14307        primary_control_compid: 0_u8,
14308        secondary_control_sysid: 0_u8,
14309        secondary_control_compid: 0_u8,
14310    };
14311    #[cfg(feature = "arbitrary")]
14312    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14313        use arbitrary::{Arbitrary, Unstructured};
14314        let mut buf = [0u8; 1024];
14315        rng.fill_bytes(&mut buf);
14316        let mut unstructured = Unstructured::new(&buf);
14317        Self::arbitrary(&mut unstructured).unwrap_or_default()
14318    }
14319}
14320impl Default for GIMBAL_MANAGER_STATUS_DATA {
14321    fn default() -> Self {
14322        Self::DEFAULT.clone()
14323    }
14324}
14325impl MessageData for GIMBAL_MANAGER_STATUS_DATA {
14326    type Message = MavMessage;
14327    const ID: u32 = 281u32;
14328    const NAME: &'static str = "GIMBAL_MANAGER_STATUS";
14329    const EXTRA_CRC: u8 = 48u8;
14330    const ENCODED_LEN: usize = 13usize;
14331    fn deser(
14332        _version: MavlinkVersion,
14333        __input: &[u8],
14334    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14335        let avail_len = __input.len();
14336        let mut payload_buf = [0; Self::ENCODED_LEN];
14337        let mut buf = if avail_len < Self::ENCODED_LEN {
14338            payload_buf[0..avail_len].copy_from_slice(__input);
14339            Bytes::new(&payload_buf)
14340        } else {
14341            Bytes::new(__input)
14342        };
14343        let mut __struct = Self::default();
14344        __struct.time_boot_ms = buf.get_u32_le();
14345        let tmp = buf.get_u32_le();
14346        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
14347            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
14348                flag_type: "GimbalManagerFlags",
14349                value: tmp as u32,
14350            })?;
14351        __struct.gimbal_device_id = buf.get_u8();
14352        __struct.primary_control_sysid = buf.get_u8();
14353        __struct.primary_control_compid = buf.get_u8();
14354        __struct.secondary_control_sysid = buf.get_u8();
14355        __struct.secondary_control_compid = buf.get_u8();
14356        Ok(__struct)
14357    }
14358    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14359        let mut __tmp = BytesMut::new(bytes);
14360        #[allow(clippy::absurd_extreme_comparisons)]
14361        #[allow(unused_comparisons)]
14362        if __tmp.remaining() < Self::ENCODED_LEN {
14363            panic!(
14364                "buffer is too small (need {} bytes, but got {})",
14365                Self::ENCODED_LEN,
14366                __tmp.remaining(),
14367            )
14368        }
14369        __tmp.put_u32_le(self.time_boot_ms);
14370        __tmp.put_u32_le(self.flags.bits());
14371        __tmp.put_u8(self.gimbal_device_id);
14372        __tmp.put_u8(self.primary_control_sysid);
14373        __tmp.put_u8(self.primary_control_compid);
14374        __tmp.put_u8(self.secondary_control_sysid);
14375        __tmp.put_u8(self.secondary_control_compid);
14376        if matches!(version, MavlinkVersion::V2) {
14377            let len = __tmp.len();
14378            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14379        } else {
14380            __tmp.len()
14381        }
14382    }
14383}
14384#[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It                is designed as scaled integer message since the resolution of float is not sufficient."]
14385#[doc = ""]
14386#[doc = "ID: 33"]
14387#[derive(Debug, Clone, PartialEq)]
14388#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14389#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14390#[cfg_attr(feature = "ts", derive(TS))]
14391#[cfg_attr(feature = "ts", ts(export))]
14392pub struct GLOBAL_POSITION_INT_DATA {
14393    #[doc = "Timestamp (time since system boot)."]
14394    pub time_boot_ms: u32,
14395    #[doc = "Latitude, expressed"]
14396    pub lat: i32,
14397    #[doc = "Longitude, expressed"]
14398    pub lon: i32,
14399    #[doc = "Altitude (MSL). Note that virtually all GPS modules provide both WGS84 and MSL."]
14400    pub alt: i32,
14401    #[doc = "Altitude above home"]
14402    pub relative_alt: i32,
14403    #[doc = "Ground X Speed (Latitude, positive north)"]
14404    pub vx: i16,
14405    #[doc = "Ground Y Speed (Longitude, positive east)"]
14406    pub vy: i16,
14407    #[doc = "Ground Z Speed (Altitude, positive down)"]
14408    pub vz: i16,
14409    #[doc = "Vehicle heading (yaw angle), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
14410    pub hdg: u16,
14411}
14412impl GLOBAL_POSITION_INT_DATA {
14413    pub const ENCODED_LEN: usize = 28usize;
14414    pub const DEFAULT: Self = Self {
14415        time_boot_ms: 0_u32,
14416        lat: 0_i32,
14417        lon: 0_i32,
14418        alt: 0_i32,
14419        relative_alt: 0_i32,
14420        vx: 0_i16,
14421        vy: 0_i16,
14422        vz: 0_i16,
14423        hdg: 0_u16,
14424    };
14425    #[cfg(feature = "arbitrary")]
14426    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14427        use arbitrary::{Arbitrary, Unstructured};
14428        let mut buf = [0u8; 1024];
14429        rng.fill_bytes(&mut buf);
14430        let mut unstructured = Unstructured::new(&buf);
14431        Self::arbitrary(&mut unstructured).unwrap_or_default()
14432    }
14433}
14434impl Default for GLOBAL_POSITION_INT_DATA {
14435    fn default() -> Self {
14436        Self::DEFAULT.clone()
14437    }
14438}
14439impl MessageData for GLOBAL_POSITION_INT_DATA {
14440    type Message = MavMessage;
14441    const ID: u32 = 33u32;
14442    const NAME: &'static str = "GLOBAL_POSITION_INT";
14443    const EXTRA_CRC: u8 = 104u8;
14444    const ENCODED_LEN: usize = 28usize;
14445    fn deser(
14446        _version: MavlinkVersion,
14447        __input: &[u8],
14448    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14449        let avail_len = __input.len();
14450        let mut payload_buf = [0; Self::ENCODED_LEN];
14451        let mut buf = if avail_len < Self::ENCODED_LEN {
14452            payload_buf[0..avail_len].copy_from_slice(__input);
14453            Bytes::new(&payload_buf)
14454        } else {
14455            Bytes::new(__input)
14456        };
14457        let mut __struct = Self::default();
14458        __struct.time_boot_ms = buf.get_u32_le();
14459        __struct.lat = buf.get_i32_le();
14460        __struct.lon = buf.get_i32_le();
14461        __struct.alt = buf.get_i32_le();
14462        __struct.relative_alt = buf.get_i32_le();
14463        __struct.vx = buf.get_i16_le();
14464        __struct.vy = buf.get_i16_le();
14465        __struct.vz = buf.get_i16_le();
14466        __struct.hdg = buf.get_u16_le();
14467        Ok(__struct)
14468    }
14469    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14470        let mut __tmp = BytesMut::new(bytes);
14471        #[allow(clippy::absurd_extreme_comparisons)]
14472        #[allow(unused_comparisons)]
14473        if __tmp.remaining() < Self::ENCODED_LEN {
14474            panic!(
14475                "buffer is too small (need {} bytes, but got {})",
14476                Self::ENCODED_LEN,
14477                __tmp.remaining(),
14478            )
14479        }
14480        __tmp.put_u32_le(self.time_boot_ms);
14481        __tmp.put_i32_le(self.lat);
14482        __tmp.put_i32_le(self.lon);
14483        __tmp.put_i32_le(self.alt);
14484        __tmp.put_i32_le(self.relative_alt);
14485        __tmp.put_i16_le(self.vx);
14486        __tmp.put_i16_le(self.vy);
14487        __tmp.put_i16_le(self.vz);
14488        __tmp.put_u16_le(self.hdg);
14489        if matches!(version, MavlinkVersion::V2) {
14490            let len = __tmp.len();
14491            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14492        } else {
14493            __tmp.len()
14494        }
14495    }
14496}
14497#[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It  is designed as scaled integer message since the resolution of float is not sufficient. NOTE: This message is intended for onboard networks / companion computers and higher-bandwidth links and optimized for accuracy and completeness. Please use the GLOBAL_POSITION_INT message for a minimal subset."]
14498#[doc = ""]
14499#[doc = "ID: 63"]
14500#[derive(Debug, Clone, PartialEq)]
14501#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14502#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14503#[cfg_attr(feature = "ts", derive(TS))]
14504#[cfg_attr(feature = "ts", ts(export))]
14505pub struct GLOBAL_POSITION_INT_COV_DATA {
14506    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14507    pub time_usec: u64,
14508    #[doc = "Latitude"]
14509    pub lat: i32,
14510    #[doc = "Longitude"]
14511    pub lon: i32,
14512    #[doc = "Altitude in meters above MSL"]
14513    pub alt: i32,
14514    #[doc = "Altitude above ground"]
14515    pub relative_alt: i32,
14516    #[doc = "Ground X Speed (Latitude)"]
14517    pub vx: f32,
14518    #[doc = "Ground Y Speed (Longitude)"]
14519    pub vy: f32,
14520    #[doc = "Ground Z Speed (Altitude)"]
14521    pub vz: f32,
14522    #[doc = "Row-major representation of a 6x6 position and velocity 6x6 cross-covariance matrix (states: lat, lon, alt, vx, vy, vz; first six entries are the first ROW, next six entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
14523    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14524    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14525    pub covariance: [f32; 36],
14526    #[doc = "Class id of the estimator this estimate originated from."]
14527    pub estimator_type: MavEstimatorType,
14528}
14529impl GLOBAL_POSITION_INT_COV_DATA {
14530    pub const ENCODED_LEN: usize = 181usize;
14531    pub const DEFAULT: Self = Self {
14532        time_usec: 0_u64,
14533        lat: 0_i32,
14534        lon: 0_i32,
14535        alt: 0_i32,
14536        relative_alt: 0_i32,
14537        vx: 0.0_f32,
14538        vy: 0.0_f32,
14539        vz: 0.0_f32,
14540        covariance: [0.0_f32; 36usize],
14541        estimator_type: MavEstimatorType::DEFAULT,
14542    };
14543    #[cfg(feature = "arbitrary")]
14544    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14545        use arbitrary::{Arbitrary, Unstructured};
14546        let mut buf = [0u8; 1024];
14547        rng.fill_bytes(&mut buf);
14548        let mut unstructured = Unstructured::new(&buf);
14549        Self::arbitrary(&mut unstructured).unwrap_or_default()
14550    }
14551}
14552impl Default for GLOBAL_POSITION_INT_COV_DATA {
14553    fn default() -> Self {
14554        Self::DEFAULT.clone()
14555    }
14556}
14557impl MessageData for GLOBAL_POSITION_INT_COV_DATA {
14558    type Message = MavMessage;
14559    const ID: u32 = 63u32;
14560    const NAME: &'static str = "GLOBAL_POSITION_INT_COV";
14561    const EXTRA_CRC: u8 = 119u8;
14562    const ENCODED_LEN: usize = 181usize;
14563    fn deser(
14564        _version: MavlinkVersion,
14565        __input: &[u8],
14566    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14567        let avail_len = __input.len();
14568        let mut payload_buf = [0; Self::ENCODED_LEN];
14569        let mut buf = if avail_len < Self::ENCODED_LEN {
14570            payload_buf[0..avail_len].copy_from_slice(__input);
14571            Bytes::new(&payload_buf)
14572        } else {
14573            Bytes::new(__input)
14574        };
14575        let mut __struct = Self::default();
14576        __struct.time_usec = buf.get_u64_le();
14577        __struct.lat = buf.get_i32_le();
14578        __struct.lon = buf.get_i32_le();
14579        __struct.alt = buf.get_i32_le();
14580        __struct.relative_alt = buf.get_i32_le();
14581        __struct.vx = buf.get_f32_le();
14582        __struct.vy = buf.get_f32_le();
14583        __struct.vz = buf.get_f32_le();
14584        for v in &mut __struct.covariance {
14585            let val = buf.get_f32_le();
14586            *v = val;
14587        }
14588        let tmp = buf.get_u8();
14589        __struct.estimator_type =
14590            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14591                enum_type: "MavEstimatorType",
14592                value: tmp as u32,
14593            })?;
14594        Ok(__struct)
14595    }
14596    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14597        let mut __tmp = BytesMut::new(bytes);
14598        #[allow(clippy::absurd_extreme_comparisons)]
14599        #[allow(unused_comparisons)]
14600        if __tmp.remaining() < Self::ENCODED_LEN {
14601            panic!(
14602                "buffer is too small (need {} bytes, but got {})",
14603                Self::ENCODED_LEN,
14604                __tmp.remaining(),
14605            )
14606        }
14607        __tmp.put_u64_le(self.time_usec);
14608        __tmp.put_i32_le(self.lat);
14609        __tmp.put_i32_le(self.lon);
14610        __tmp.put_i32_le(self.alt);
14611        __tmp.put_i32_le(self.relative_alt);
14612        __tmp.put_f32_le(self.vx);
14613        __tmp.put_f32_le(self.vy);
14614        __tmp.put_f32_le(self.vz);
14615        for val in &self.covariance {
14616            __tmp.put_f32_le(*val);
14617        }
14618        __tmp.put_u8(self.estimator_type as u8);
14619        if matches!(version, MavlinkVersion::V2) {
14620            let len = __tmp.len();
14621            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14622        } else {
14623            __tmp.len()
14624        }
14625    }
14626}
14627#[doc = "Global position/attitude estimate from a vision source."]
14628#[doc = ""]
14629#[doc = "ID: 101"]
14630#[derive(Debug, Clone, PartialEq)]
14631#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14632#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14633#[cfg_attr(feature = "ts", derive(TS))]
14634#[cfg_attr(feature = "ts", ts(export))]
14635pub struct GLOBAL_VISION_POSITION_ESTIMATE_DATA {
14636    #[doc = "Timestamp (UNIX time or since system boot)"]
14637    pub usec: u64,
14638    #[doc = "Global X position"]
14639    pub x: f32,
14640    #[doc = "Global Y position"]
14641    pub y: f32,
14642    #[doc = "Global Z position"]
14643    pub z: f32,
14644    #[doc = "Roll angle"]
14645    pub roll: f32,
14646    #[doc = "Pitch angle"]
14647    pub pitch: f32,
14648    #[doc = "Yaw angle"]
14649    pub yaw: f32,
14650    #[doc = "Row-major representation of pose 6x6 cross-covariance matrix upper right triangle (states: x_global, y_global, z_global, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
14651    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14652    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14653    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14654    pub covariance: [f32; 21],
14655    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
14656    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14657    pub reset_counter: u8,
14658}
14659impl GLOBAL_VISION_POSITION_ESTIMATE_DATA {
14660    pub const ENCODED_LEN: usize = 117usize;
14661    pub const DEFAULT: Self = Self {
14662        usec: 0_u64,
14663        x: 0.0_f32,
14664        y: 0.0_f32,
14665        z: 0.0_f32,
14666        roll: 0.0_f32,
14667        pitch: 0.0_f32,
14668        yaw: 0.0_f32,
14669        covariance: [0.0_f32; 21usize],
14670        reset_counter: 0_u8,
14671    };
14672    #[cfg(feature = "arbitrary")]
14673    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14674        use arbitrary::{Arbitrary, Unstructured};
14675        let mut buf = [0u8; 1024];
14676        rng.fill_bytes(&mut buf);
14677        let mut unstructured = Unstructured::new(&buf);
14678        Self::arbitrary(&mut unstructured).unwrap_or_default()
14679    }
14680}
14681impl Default for GLOBAL_VISION_POSITION_ESTIMATE_DATA {
14682    fn default() -> Self {
14683        Self::DEFAULT.clone()
14684    }
14685}
14686impl MessageData for GLOBAL_VISION_POSITION_ESTIMATE_DATA {
14687    type Message = MavMessage;
14688    const ID: u32 = 101u32;
14689    const NAME: &'static str = "GLOBAL_VISION_POSITION_ESTIMATE";
14690    const EXTRA_CRC: u8 = 102u8;
14691    const ENCODED_LEN: usize = 117usize;
14692    fn deser(
14693        _version: MavlinkVersion,
14694        __input: &[u8],
14695    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14696        let avail_len = __input.len();
14697        let mut payload_buf = [0; Self::ENCODED_LEN];
14698        let mut buf = if avail_len < Self::ENCODED_LEN {
14699            payload_buf[0..avail_len].copy_from_slice(__input);
14700            Bytes::new(&payload_buf)
14701        } else {
14702            Bytes::new(__input)
14703        };
14704        let mut __struct = Self::default();
14705        __struct.usec = buf.get_u64_le();
14706        __struct.x = buf.get_f32_le();
14707        __struct.y = buf.get_f32_le();
14708        __struct.z = buf.get_f32_le();
14709        __struct.roll = buf.get_f32_le();
14710        __struct.pitch = buf.get_f32_le();
14711        __struct.yaw = buf.get_f32_le();
14712        for v in &mut __struct.covariance {
14713            let val = buf.get_f32_le();
14714            *v = val;
14715        }
14716        __struct.reset_counter = buf.get_u8();
14717        Ok(__struct)
14718    }
14719    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14720        let mut __tmp = BytesMut::new(bytes);
14721        #[allow(clippy::absurd_extreme_comparisons)]
14722        #[allow(unused_comparisons)]
14723        if __tmp.remaining() < Self::ENCODED_LEN {
14724            panic!(
14725                "buffer is too small (need {} bytes, but got {})",
14726                Self::ENCODED_LEN,
14727                __tmp.remaining(),
14728            )
14729        }
14730        __tmp.put_u64_le(self.usec);
14731        __tmp.put_f32_le(self.x);
14732        __tmp.put_f32_le(self.y);
14733        __tmp.put_f32_le(self.z);
14734        __tmp.put_f32_le(self.roll);
14735        __tmp.put_f32_le(self.pitch);
14736        __tmp.put_f32_le(self.yaw);
14737        if matches!(version, MavlinkVersion::V2) {
14738            for val in &self.covariance {
14739                __tmp.put_f32_le(*val);
14740            }
14741            __tmp.put_u8(self.reset_counter);
14742            let len = __tmp.len();
14743            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14744        } else {
14745            __tmp.len()
14746        }
14747    }
14748}
14749#[doc = "Second GPS data."]
14750#[doc = ""]
14751#[doc = "ID: 124"]
14752#[derive(Debug, Clone, PartialEq)]
14753#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14754#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14755#[cfg_attr(feature = "ts", derive(TS))]
14756#[cfg_attr(feature = "ts", ts(export))]
14757pub struct GPS2_RAW_DATA {
14758    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14759    pub time_usec: u64,
14760    #[doc = "Latitude (WGS84)"]
14761    pub lat: i32,
14762    #[doc = "Longitude (WGS84)"]
14763    pub lon: i32,
14764    #[doc = "Altitude (MSL). Positive for up."]
14765    pub alt: i32,
14766    #[doc = "Age of DGPS info"]
14767    pub dgps_age: u32,
14768    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
14769    pub eph: u16,
14770    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
14771    pub epv: u16,
14772    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
14773    pub vel: u16,
14774    #[doc = "Course over ground (NOT heading, but direction of movement): 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
14775    pub cog: u16,
14776    #[doc = "GPS fix type."]
14777    pub fix_type: GpsFixType,
14778    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
14779    pub satellites_visible: u8,
14780    #[doc = "Number of DGPS satellites"]
14781    pub dgps_numch: u8,
14782    #[doc = "Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north."]
14783    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14784    pub yaw: u16,
14785    #[doc = "Altitude (above WGS84, EGM96 ellipsoid). Positive for up."]
14786    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14787    pub alt_ellipsoid: i32,
14788    #[doc = "Position uncertainty."]
14789    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14790    pub h_acc: u32,
14791    #[doc = "Altitude uncertainty."]
14792    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14793    pub v_acc: u32,
14794    #[doc = "Speed uncertainty."]
14795    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14796    pub vel_acc: u32,
14797    #[doc = "Heading / track uncertainty"]
14798    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14799    pub hdg_acc: u32,
14800}
14801impl GPS2_RAW_DATA {
14802    pub const ENCODED_LEN: usize = 57usize;
14803    pub const DEFAULT: Self = Self {
14804        time_usec: 0_u64,
14805        lat: 0_i32,
14806        lon: 0_i32,
14807        alt: 0_i32,
14808        dgps_age: 0_u32,
14809        eph: 0_u16,
14810        epv: 0_u16,
14811        vel: 0_u16,
14812        cog: 0_u16,
14813        fix_type: GpsFixType::DEFAULT,
14814        satellites_visible: 0_u8,
14815        dgps_numch: 0_u8,
14816        yaw: 0_u16,
14817        alt_ellipsoid: 0_i32,
14818        h_acc: 0_u32,
14819        v_acc: 0_u32,
14820        vel_acc: 0_u32,
14821        hdg_acc: 0_u32,
14822    };
14823    #[cfg(feature = "arbitrary")]
14824    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14825        use arbitrary::{Arbitrary, Unstructured};
14826        let mut buf = [0u8; 1024];
14827        rng.fill_bytes(&mut buf);
14828        let mut unstructured = Unstructured::new(&buf);
14829        Self::arbitrary(&mut unstructured).unwrap_or_default()
14830    }
14831}
14832impl Default for GPS2_RAW_DATA {
14833    fn default() -> Self {
14834        Self::DEFAULT.clone()
14835    }
14836}
14837impl MessageData for GPS2_RAW_DATA {
14838    type Message = MavMessage;
14839    const ID: u32 = 124u32;
14840    const NAME: &'static str = "GPS2_RAW";
14841    const EXTRA_CRC: u8 = 87u8;
14842    const ENCODED_LEN: usize = 57usize;
14843    fn deser(
14844        _version: MavlinkVersion,
14845        __input: &[u8],
14846    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14847        let avail_len = __input.len();
14848        let mut payload_buf = [0; Self::ENCODED_LEN];
14849        let mut buf = if avail_len < Self::ENCODED_LEN {
14850            payload_buf[0..avail_len].copy_from_slice(__input);
14851            Bytes::new(&payload_buf)
14852        } else {
14853            Bytes::new(__input)
14854        };
14855        let mut __struct = Self::default();
14856        __struct.time_usec = buf.get_u64_le();
14857        __struct.lat = buf.get_i32_le();
14858        __struct.lon = buf.get_i32_le();
14859        __struct.alt = buf.get_i32_le();
14860        __struct.dgps_age = buf.get_u32_le();
14861        __struct.eph = buf.get_u16_le();
14862        __struct.epv = buf.get_u16_le();
14863        __struct.vel = buf.get_u16_le();
14864        __struct.cog = buf.get_u16_le();
14865        let tmp = buf.get_u8();
14866        __struct.fix_type =
14867            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14868                enum_type: "GpsFixType",
14869                value: tmp as u32,
14870            })?;
14871        __struct.satellites_visible = buf.get_u8();
14872        __struct.dgps_numch = buf.get_u8();
14873        __struct.yaw = buf.get_u16_le();
14874        __struct.alt_ellipsoid = buf.get_i32_le();
14875        __struct.h_acc = buf.get_u32_le();
14876        __struct.v_acc = buf.get_u32_le();
14877        __struct.vel_acc = buf.get_u32_le();
14878        __struct.hdg_acc = buf.get_u32_le();
14879        Ok(__struct)
14880    }
14881    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14882        let mut __tmp = BytesMut::new(bytes);
14883        #[allow(clippy::absurd_extreme_comparisons)]
14884        #[allow(unused_comparisons)]
14885        if __tmp.remaining() < Self::ENCODED_LEN {
14886            panic!(
14887                "buffer is too small (need {} bytes, but got {})",
14888                Self::ENCODED_LEN,
14889                __tmp.remaining(),
14890            )
14891        }
14892        __tmp.put_u64_le(self.time_usec);
14893        __tmp.put_i32_le(self.lat);
14894        __tmp.put_i32_le(self.lon);
14895        __tmp.put_i32_le(self.alt);
14896        __tmp.put_u32_le(self.dgps_age);
14897        __tmp.put_u16_le(self.eph);
14898        __tmp.put_u16_le(self.epv);
14899        __tmp.put_u16_le(self.vel);
14900        __tmp.put_u16_le(self.cog);
14901        __tmp.put_u8(self.fix_type as u8);
14902        __tmp.put_u8(self.satellites_visible);
14903        __tmp.put_u8(self.dgps_numch);
14904        if matches!(version, MavlinkVersion::V2) {
14905            __tmp.put_u16_le(self.yaw);
14906            __tmp.put_i32_le(self.alt_ellipsoid);
14907            __tmp.put_u32_le(self.h_acc);
14908            __tmp.put_u32_le(self.v_acc);
14909            __tmp.put_u32_le(self.vel_acc);
14910            __tmp.put_u32_le(self.hdg_acc);
14911            let len = __tmp.len();
14912            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14913        } else {
14914            __tmp.len()
14915        }
14916    }
14917}
14918#[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
14919#[doc = ""]
14920#[doc = "ID: 128"]
14921#[derive(Debug, Clone, PartialEq)]
14922#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14923#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14924#[cfg_attr(feature = "ts", derive(TS))]
14925#[cfg_attr(feature = "ts", ts(export))]
14926pub struct GPS2_RTK_DATA {
14927    #[doc = "Time since boot of last baseline message received."]
14928    pub time_last_baseline_ms: u32,
14929    #[doc = "GPS Time of Week of last baseline"]
14930    pub tow: u32,
14931    #[doc = "Current baseline in ECEF x or NED north component."]
14932    pub baseline_a_mm: i32,
14933    #[doc = "Current baseline in ECEF y or NED east component."]
14934    pub baseline_b_mm: i32,
14935    #[doc = "Current baseline in ECEF z or NED down component."]
14936    pub baseline_c_mm: i32,
14937    #[doc = "Current estimate of baseline accuracy."]
14938    pub accuracy: u32,
14939    #[doc = "Current number of integer ambiguity hypotheses."]
14940    pub iar_num_hypotheses: i32,
14941    #[doc = "GPS Week Number of last baseline"]
14942    pub wn: u16,
14943    #[doc = "Identification of connected RTK receiver."]
14944    pub rtk_receiver_id: u8,
14945    #[doc = "GPS-specific health report for RTK data."]
14946    pub rtk_health: u8,
14947    #[doc = "Rate of baseline messages being received by GPS"]
14948    pub rtk_rate: u8,
14949    #[doc = "Current number of sats used for RTK calculation."]
14950    pub nsats: u8,
14951    #[doc = "Coordinate system of baseline"]
14952    pub baseline_coords_type: RtkBaselineCoordinateSystem,
14953}
14954impl GPS2_RTK_DATA {
14955    pub const ENCODED_LEN: usize = 35usize;
14956    pub const DEFAULT: Self = Self {
14957        time_last_baseline_ms: 0_u32,
14958        tow: 0_u32,
14959        baseline_a_mm: 0_i32,
14960        baseline_b_mm: 0_i32,
14961        baseline_c_mm: 0_i32,
14962        accuracy: 0_u32,
14963        iar_num_hypotheses: 0_i32,
14964        wn: 0_u16,
14965        rtk_receiver_id: 0_u8,
14966        rtk_health: 0_u8,
14967        rtk_rate: 0_u8,
14968        nsats: 0_u8,
14969        baseline_coords_type: RtkBaselineCoordinateSystem::DEFAULT,
14970    };
14971    #[cfg(feature = "arbitrary")]
14972    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14973        use arbitrary::{Arbitrary, Unstructured};
14974        let mut buf = [0u8; 1024];
14975        rng.fill_bytes(&mut buf);
14976        let mut unstructured = Unstructured::new(&buf);
14977        Self::arbitrary(&mut unstructured).unwrap_or_default()
14978    }
14979}
14980impl Default for GPS2_RTK_DATA {
14981    fn default() -> Self {
14982        Self::DEFAULT.clone()
14983    }
14984}
14985impl MessageData for GPS2_RTK_DATA {
14986    type Message = MavMessage;
14987    const ID: u32 = 128u32;
14988    const NAME: &'static str = "GPS2_RTK";
14989    const EXTRA_CRC: u8 = 226u8;
14990    const ENCODED_LEN: usize = 35usize;
14991    fn deser(
14992        _version: MavlinkVersion,
14993        __input: &[u8],
14994    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14995        let avail_len = __input.len();
14996        let mut payload_buf = [0; Self::ENCODED_LEN];
14997        let mut buf = if avail_len < Self::ENCODED_LEN {
14998            payload_buf[0..avail_len].copy_from_slice(__input);
14999            Bytes::new(&payload_buf)
15000        } else {
15001            Bytes::new(__input)
15002        };
15003        let mut __struct = Self::default();
15004        __struct.time_last_baseline_ms = buf.get_u32_le();
15005        __struct.tow = buf.get_u32_le();
15006        __struct.baseline_a_mm = buf.get_i32_le();
15007        __struct.baseline_b_mm = buf.get_i32_le();
15008        __struct.baseline_c_mm = buf.get_i32_le();
15009        __struct.accuracy = buf.get_u32_le();
15010        __struct.iar_num_hypotheses = buf.get_i32_le();
15011        __struct.wn = buf.get_u16_le();
15012        __struct.rtk_receiver_id = buf.get_u8();
15013        __struct.rtk_health = buf.get_u8();
15014        __struct.rtk_rate = buf.get_u8();
15015        __struct.nsats = buf.get_u8();
15016        let tmp = buf.get_u8();
15017        __struct.baseline_coords_type =
15018            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15019                enum_type: "RtkBaselineCoordinateSystem",
15020                value: tmp as u32,
15021            })?;
15022        Ok(__struct)
15023    }
15024    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15025        let mut __tmp = BytesMut::new(bytes);
15026        #[allow(clippy::absurd_extreme_comparisons)]
15027        #[allow(unused_comparisons)]
15028        if __tmp.remaining() < Self::ENCODED_LEN {
15029            panic!(
15030                "buffer is too small (need {} bytes, but got {})",
15031                Self::ENCODED_LEN,
15032                __tmp.remaining(),
15033            )
15034        }
15035        __tmp.put_u32_le(self.time_last_baseline_ms);
15036        __tmp.put_u32_le(self.tow);
15037        __tmp.put_i32_le(self.baseline_a_mm);
15038        __tmp.put_i32_le(self.baseline_b_mm);
15039        __tmp.put_i32_le(self.baseline_c_mm);
15040        __tmp.put_u32_le(self.accuracy);
15041        __tmp.put_i32_le(self.iar_num_hypotheses);
15042        __tmp.put_u16_le(self.wn);
15043        __tmp.put_u8(self.rtk_receiver_id);
15044        __tmp.put_u8(self.rtk_health);
15045        __tmp.put_u8(self.rtk_rate);
15046        __tmp.put_u8(self.nsats);
15047        __tmp.put_u8(self.baseline_coords_type as u8);
15048        if matches!(version, MavlinkVersion::V2) {
15049            let len = __tmp.len();
15050            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15051        } else {
15052            __tmp.len()
15053        }
15054    }
15055}
15056#[doc = "Publishes the GPS coordinates of the vehicle local origin (0,0,0) position. Emitted whenever a new GPS-Local position mapping is requested or set - e.g. following SET_GPS_GLOBAL_ORIGIN message."]
15057#[doc = ""]
15058#[doc = "ID: 49"]
15059#[derive(Debug, Clone, PartialEq)]
15060#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15061#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15062#[cfg_attr(feature = "ts", derive(TS))]
15063#[cfg_attr(feature = "ts", ts(export))]
15064pub struct GPS_GLOBAL_ORIGIN_DATA {
15065    #[doc = "Latitude (WGS84)"]
15066    pub latitude: i32,
15067    #[doc = "Longitude (WGS84)"]
15068    pub longitude: i32,
15069    #[doc = "Altitude (MSL). Positive for up."]
15070    pub altitude: i32,
15071    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15072    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15073    pub time_usec: u64,
15074}
15075impl GPS_GLOBAL_ORIGIN_DATA {
15076    pub const ENCODED_LEN: usize = 20usize;
15077    pub const DEFAULT: Self = Self {
15078        latitude: 0_i32,
15079        longitude: 0_i32,
15080        altitude: 0_i32,
15081        time_usec: 0_u64,
15082    };
15083    #[cfg(feature = "arbitrary")]
15084    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15085        use arbitrary::{Arbitrary, Unstructured};
15086        let mut buf = [0u8; 1024];
15087        rng.fill_bytes(&mut buf);
15088        let mut unstructured = Unstructured::new(&buf);
15089        Self::arbitrary(&mut unstructured).unwrap_or_default()
15090    }
15091}
15092impl Default for GPS_GLOBAL_ORIGIN_DATA {
15093    fn default() -> Self {
15094        Self::DEFAULT.clone()
15095    }
15096}
15097impl MessageData for GPS_GLOBAL_ORIGIN_DATA {
15098    type Message = MavMessage;
15099    const ID: u32 = 49u32;
15100    const NAME: &'static str = "GPS_GLOBAL_ORIGIN";
15101    const EXTRA_CRC: u8 = 39u8;
15102    const ENCODED_LEN: usize = 20usize;
15103    fn deser(
15104        _version: MavlinkVersion,
15105        __input: &[u8],
15106    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15107        let avail_len = __input.len();
15108        let mut payload_buf = [0; Self::ENCODED_LEN];
15109        let mut buf = if avail_len < Self::ENCODED_LEN {
15110            payload_buf[0..avail_len].copy_from_slice(__input);
15111            Bytes::new(&payload_buf)
15112        } else {
15113            Bytes::new(__input)
15114        };
15115        let mut __struct = Self::default();
15116        __struct.latitude = buf.get_i32_le();
15117        __struct.longitude = buf.get_i32_le();
15118        __struct.altitude = buf.get_i32_le();
15119        __struct.time_usec = buf.get_u64_le();
15120        Ok(__struct)
15121    }
15122    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15123        let mut __tmp = BytesMut::new(bytes);
15124        #[allow(clippy::absurd_extreme_comparisons)]
15125        #[allow(unused_comparisons)]
15126        if __tmp.remaining() < Self::ENCODED_LEN {
15127            panic!(
15128                "buffer is too small (need {} bytes, but got {})",
15129                Self::ENCODED_LEN,
15130                __tmp.remaining(),
15131            )
15132        }
15133        __tmp.put_i32_le(self.latitude);
15134        __tmp.put_i32_le(self.longitude);
15135        __tmp.put_i32_le(self.altitude);
15136        if matches!(version, MavlinkVersion::V2) {
15137            __tmp.put_u64_le(self.time_usec);
15138            let len = __tmp.len();
15139            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15140        } else {
15141            __tmp.len()
15142        }
15143    }
15144}
15145#[deprecated = " See `GPS_RTCM_DATA` (Deprecated since 2022-05)"]
15146#[doc = "Data for injecting into the onboard GPS (used for DGPS)."]
15147#[doc = ""]
15148#[doc = "ID: 123"]
15149#[derive(Debug, Clone, PartialEq)]
15150#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15151#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15152#[cfg_attr(feature = "ts", derive(TS))]
15153#[cfg_attr(feature = "ts", ts(export))]
15154pub struct GPS_INJECT_DATA_DATA {
15155    #[doc = "System ID"]
15156    pub target_system: u8,
15157    #[doc = "Component ID"]
15158    pub target_component: u8,
15159    #[doc = "Data length"]
15160    pub len: u8,
15161    #[doc = "Raw data (110 is enough for 12 satellites of RTCMv2)"]
15162    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15163    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15164    pub data: [u8; 110],
15165}
15166impl GPS_INJECT_DATA_DATA {
15167    pub const ENCODED_LEN: usize = 113usize;
15168    pub const DEFAULT: Self = Self {
15169        target_system: 0_u8,
15170        target_component: 0_u8,
15171        len: 0_u8,
15172        data: [0_u8; 110usize],
15173    };
15174    #[cfg(feature = "arbitrary")]
15175    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15176        use arbitrary::{Arbitrary, Unstructured};
15177        let mut buf = [0u8; 1024];
15178        rng.fill_bytes(&mut buf);
15179        let mut unstructured = Unstructured::new(&buf);
15180        Self::arbitrary(&mut unstructured).unwrap_or_default()
15181    }
15182}
15183impl Default for GPS_INJECT_DATA_DATA {
15184    fn default() -> Self {
15185        Self::DEFAULT.clone()
15186    }
15187}
15188impl MessageData for GPS_INJECT_DATA_DATA {
15189    type Message = MavMessage;
15190    const ID: u32 = 123u32;
15191    const NAME: &'static str = "GPS_INJECT_DATA";
15192    const EXTRA_CRC: u8 = 250u8;
15193    const ENCODED_LEN: usize = 113usize;
15194    fn deser(
15195        _version: MavlinkVersion,
15196        __input: &[u8],
15197    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15198        let avail_len = __input.len();
15199        let mut payload_buf = [0; Self::ENCODED_LEN];
15200        let mut buf = if avail_len < Self::ENCODED_LEN {
15201            payload_buf[0..avail_len].copy_from_slice(__input);
15202            Bytes::new(&payload_buf)
15203        } else {
15204            Bytes::new(__input)
15205        };
15206        let mut __struct = Self::default();
15207        __struct.target_system = buf.get_u8();
15208        __struct.target_component = buf.get_u8();
15209        __struct.len = buf.get_u8();
15210        for v in &mut __struct.data {
15211            let val = buf.get_u8();
15212            *v = val;
15213        }
15214        Ok(__struct)
15215    }
15216    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15217        let mut __tmp = BytesMut::new(bytes);
15218        #[allow(clippy::absurd_extreme_comparisons)]
15219        #[allow(unused_comparisons)]
15220        if __tmp.remaining() < Self::ENCODED_LEN {
15221            panic!(
15222                "buffer is too small (need {} bytes, but got {})",
15223                Self::ENCODED_LEN,
15224                __tmp.remaining(),
15225            )
15226        }
15227        __tmp.put_u8(self.target_system);
15228        __tmp.put_u8(self.target_component);
15229        __tmp.put_u8(self.len);
15230        for val in &self.data {
15231            __tmp.put_u8(*val);
15232        }
15233        if matches!(version, MavlinkVersion::V2) {
15234            let len = __tmp.len();
15235            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15236        } else {
15237            __tmp.len()
15238        }
15239    }
15240}
15241#[doc = "GPS sensor input message.  This is a raw sensor value sent by the GPS. This is NOT the global position estimate of the system."]
15242#[doc = ""]
15243#[doc = "ID: 232"]
15244#[derive(Debug, Clone, PartialEq)]
15245#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15246#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15247#[cfg_attr(feature = "ts", derive(TS))]
15248#[cfg_attr(feature = "ts", ts(export))]
15249pub struct GPS_INPUT_DATA {
15250    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15251    pub time_usec: u64,
15252    #[doc = "GPS time (from start of GPS week)"]
15253    pub time_week_ms: u32,
15254    #[doc = "Latitude (WGS84)"]
15255    pub lat: i32,
15256    #[doc = "Longitude (WGS84)"]
15257    pub lon: i32,
15258    #[doc = "Altitude (MSL). Positive for up."]
15259    pub alt: f32,
15260    #[doc = "GPS HDOP horizontal dilution of position (unitless). If unknown, set to: UINT16_MAX"]
15261    pub hdop: f32,
15262    #[doc = "GPS VDOP vertical dilution of position (unitless). If unknown, set to: UINT16_MAX"]
15263    pub vdop: f32,
15264    #[doc = "GPS velocity in north direction in earth-fixed NED frame"]
15265    pub vn: f32,
15266    #[doc = "GPS velocity in east direction in earth-fixed NED frame"]
15267    pub ve: f32,
15268    #[doc = "GPS velocity in down direction in earth-fixed NED frame"]
15269    pub vd: f32,
15270    #[doc = "GPS speed accuracy"]
15271    pub speed_accuracy: f32,
15272    #[doc = "GPS horizontal accuracy"]
15273    pub horiz_accuracy: f32,
15274    #[doc = "GPS vertical accuracy"]
15275    pub vert_accuracy: f32,
15276    #[doc = "Bitmap indicating which GPS input flags fields to ignore.  All other fields must be provided."]
15277    pub ignore_flags: GpsInputIgnoreFlags,
15278    #[doc = "GPS week number"]
15279    pub time_week: u16,
15280    #[doc = "ID of the GPS for multiple GPS inputs"]
15281    pub gps_id: u8,
15282    #[doc = "0-1: no fix, 2: 2D fix, 3: 3D fix. 4: 3D with DGPS. 5: 3D with RTK"]
15283    pub fix_type: u8,
15284    #[doc = "Number of satellites visible."]
15285    pub satellites_visible: u8,
15286    #[doc = "Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north"]
15287    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15288    pub yaw: u16,
15289}
15290impl GPS_INPUT_DATA {
15291    pub const ENCODED_LEN: usize = 65usize;
15292    pub const DEFAULT: Self = Self {
15293        time_usec: 0_u64,
15294        time_week_ms: 0_u32,
15295        lat: 0_i32,
15296        lon: 0_i32,
15297        alt: 0.0_f32,
15298        hdop: 0.0_f32,
15299        vdop: 0.0_f32,
15300        vn: 0.0_f32,
15301        ve: 0.0_f32,
15302        vd: 0.0_f32,
15303        speed_accuracy: 0.0_f32,
15304        horiz_accuracy: 0.0_f32,
15305        vert_accuracy: 0.0_f32,
15306        ignore_flags: GpsInputIgnoreFlags::DEFAULT,
15307        time_week: 0_u16,
15308        gps_id: 0_u8,
15309        fix_type: 0_u8,
15310        satellites_visible: 0_u8,
15311        yaw: 0_u16,
15312    };
15313    #[cfg(feature = "arbitrary")]
15314    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15315        use arbitrary::{Arbitrary, Unstructured};
15316        let mut buf = [0u8; 1024];
15317        rng.fill_bytes(&mut buf);
15318        let mut unstructured = Unstructured::new(&buf);
15319        Self::arbitrary(&mut unstructured).unwrap_or_default()
15320    }
15321}
15322impl Default for GPS_INPUT_DATA {
15323    fn default() -> Self {
15324        Self::DEFAULT.clone()
15325    }
15326}
15327impl MessageData for GPS_INPUT_DATA {
15328    type Message = MavMessage;
15329    const ID: u32 = 232u32;
15330    const NAME: &'static str = "GPS_INPUT";
15331    const EXTRA_CRC: u8 = 151u8;
15332    const ENCODED_LEN: usize = 65usize;
15333    fn deser(
15334        _version: MavlinkVersion,
15335        __input: &[u8],
15336    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15337        let avail_len = __input.len();
15338        let mut payload_buf = [0; Self::ENCODED_LEN];
15339        let mut buf = if avail_len < Self::ENCODED_LEN {
15340            payload_buf[0..avail_len].copy_from_slice(__input);
15341            Bytes::new(&payload_buf)
15342        } else {
15343            Bytes::new(__input)
15344        };
15345        let mut __struct = Self::default();
15346        __struct.time_usec = buf.get_u64_le();
15347        __struct.time_week_ms = buf.get_u32_le();
15348        __struct.lat = buf.get_i32_le();
15349        __struct.lon = buf.get_i32_le();
15350        __struct.alt = buf.get_f32_le();
15351        __struct.hdop = buf.get_f32_le();
15352        __struct.vdop = buf.get_f32_le();
15353        __struct.vn = buf.get_f32_le();
15354        __struct.ve = buf.get_f32_le();
15355        __struct.vd = buf.get_f32_le();
15356        __struct.speed_accuracy = buf.get_f32_le();
15357        __struct.horiz_accuracy = buf.get_f32_le();
15358        __struct.vert_accuracy = buf.get_f32_le();
15359        let tmp = buf.get_u16_le();
15360        __struct.ignore_flags = GpsInputIgnoreFlags::from_bits(
15361            tmp & GpsInputIgnoreFlags::all().bits(),
15362        )
15363        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
15364            flag_type: "GpsInputIgnoreFlags",
15365            value: tmp as u32,
15366        })?;
15367        __struct.time_week = buf.get_u16_le();
15368        __struct.gps_id = buf.get_u8();
15369        __struct.fix_type = buf.get_u8();
15370        __struct.satellites_visible = buf.get_u8();
15371        __struct.yaw = buf.get_u16_le();
15372        Ok(__struct)
15373    }
15374    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15375        let mut __tmp = BytesMut::new(bytes);
15376        #[allow(clippy::absurd_extreme_comparisons)]
15377        #[allow(unused_comparisons)]
15378        if __tmp.remaining() < Self::ENCODED_LEN {
15379            panic!(
15380                "buffer is too small (need {} bytes, but got {})",
15381                Self::ENCODED_LEN,
15382                __tmp.remaining(),
15383            )
15384        }
15385        __tmp.put_u64_le(self.time_usec);
15386        __tmp.put_u32_le(self.time_week_ms);
15387        __tmp.put_i32_le(self.lat);
15388        __tmp.put_i32_le(self.lon);
15389        __tmp.put_f32_le(self.alt);
15390        __tmp.put_f32_le(self.hdop);
15391        __tmp.put_f32_le(self.vdop);
15392        __tmp.put_f32_le(self.vn);
15393        __tmp.put_f32_le(self.ve);
15394        __tmp.put_f32_le(self.vd);
15395        __tmp.put_f32_le(self.speed_accuracy);
15396        __tmp.put_f32_le(self.horiz_accuracy);
15397        __tmp.put_f32_le(self.vert_accuracy);
15398        __tmp.put_u16_le(self.ignore_flags.bits());
15399        __tmp.put_u16_le(self.time_week);
15400        __tmp.put_u8(self.gps_id);
15401        __tmp.put_u8(self.fix_type);
15402        __tmp.put_u8(self.satellites_visible);
15403        if matches!(version, MavlinkVersion::V2) {
15404            __tmp.put_u16_le(self.yaw);
15405            let len = __tmp.len();
15406            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15407        } else {
15408            __tmp.len()
15409        }
15410    }
15411}
15412#[doc = "The global position, as returned by the Global Positioning System (GPS). This is                 NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
15413#[doc = ""]
15414#[doc = "ID: 24"]
15415#[derive(Debug, Clone, PartialEq)]
15416#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15417#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15418#[cfg_attr(feature = "ts", derive(TS))]
15419#[cfg_attr(feature = "ts", ts(export))]
15420pub struct GPS_RAW_INT_DATA {
15421    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15422    pub time_usec: u64,
15423    #[doc = "Latitude (WGS84, EGM96 ellipsoid)"]
15424    pub lat: i32,
15425    #[doc = "Longitude (WGS84, EGM96 ellipsoid)"]
15426    pub lon: i32,
15427    #[doc = "Altitude (MSL). Positive for up. Note that virtually all GPS modules provide the MSL altitude in addition to the WGS84 altitude."]
15428    pub alt: i32,
15429    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
15430    pub eph: u16,
15431    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
15432    pub epv: u16,
15433    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
15434    pub vel: u16,
15435    #[doc = "Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
15436    pub cog: u16,
15437    #[doc = "GPS fix type."]
15438    pub fix_type: GpsFixType,
15439    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
15440    pub satellites_visible: u8,
15441    #[doc = "Altitude (above WGS84, EGM96 ellipsoid). Positive for up."]
15442    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15443    pub alt_ellipsoid: i32,
15444    #[doc = "Position uncertainty."]
15445    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15446    pub h_acc: u32,
15447    #[doc = "Altitude uncertainty."]
15448    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15449    pub v_acc: u32,
15450    #[doc = "Speed uncertainty."]
15451    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15452    pub vel_acc: u32,
15453    #[doc = "Heading / track uncertainty"]
15454    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15455    pub hdg_acc: u32,
15456    #[doc = "Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north."]
15457    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15458    pub yaw: u16,
15459}
15460impl GPS_RAW_INT_DATA {
15461    pub const ENCODED_LEN: usize = 52usize;
15462    pub const DEFAULT: Self = Self {
15463        time_usec: 0_u64,
15464        lat: 0_i32,
15465        lon: 0_i32,
15466        alt: 0_i32,
15467        eph: 0_u16,
15468        epv: 0_u16,
15469        vel: 0_u16,
15470        cog: 0_u16,
15471        fix_type: GpsFixType::DEFAULT,
15472        satellites_visible: 0_u8,
15473        alt_ellipsoid: 0_i32,
15474        h_acc: 0_u32,
15475        v_acc: 0_u32,
15476        vel_acc: 0_u32,
15477        hdg_acc: 0_u32,
15478        yaw: 0_u16,
15479    };
15480    #[cfg(feature = "arbitrary")]
15481    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15482        use arbitrary::{Arbitrary, Unstructured};
15483        let mut buf = [0u8; 1024];
15484        rng.fill_bytes(&mut buf);
15485        let mut unstructured = Unstructured::new(&buf);
15486        Self::arbitrary(&mut unstructured).unwrap_or_default()
15487    }
15488}
15489impl Default for GPS_RAW_INT_DATA {
15490    fn default() -> Self {
15491        Self::DEFAULT.clone()
15492    }
15493}
15494impl MessageData for GPS_RAW_INT_DATA {
15495    type Message = MavMessage;
15496    const ID: u32 = 24u32;
15497    const NAME: &'static str = "GPS_RAW_INT";
15498    const EXTRA_CRC: u8 = 24u8;
15499    const ENCODED_LEN: usize = 52usize;
15500    fn deser(
15501        _version: MavlinkVersion,
15502        __input: &[u8],
15503    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15504        let avail_len = __input.len();
15505        let mut payload_buf = [0; Self::ENCODED_LEN];
15506        let mut buf = if avail_len < Self::ENCODED_LEN {
15507            payload_buf[0..avail_len].copy_from_slice(__input);
15508            Bytes::new(&payload_buf)
15509        } else {
15510            Bytes::new(__input)
15511        };
15512        let mut __struct = Self::default();
15513        __struct.time_usec = buf.get_u64_le();
15514        __struct.lat = buf.get_i32_le();
15515        __struct.lon = buf.get_i32_le();
15516        __struct.alt = buf.get_i32_le();
15517        __struct.eph = buf.get_u16_le();
15518        __struct.epv = buf.get_u16_le();
15519        __struct.vel = buf.get_u16_le();
15520        __struct.cog = buf.get_u16_le();
15521        let tmp = buf.get_u8();
15522        __struct.fix_type =
15523            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15524                enum_type: "GpsFixType",
15525                value: tmp as u32,
15526            })?;
15527        __struct.satellites_visible = buf.get_u8();
15528        __struct.alt_ellipsoid = buf.get_i32_le();
15529        __struct.h_acc = buf.get_u32_le();
15530        __struct.v_acc = buf.get_u32_le();
15531        __struct.vel_acc = buf.get_u32_le();
15532        __struct.hdg_acc = buf.get_u32_le();
15533        __struct.yaw = buf.get_u16_le();
15534        Ok(__struct)
15535    }
15536    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15537        let mut __tmp = BytesMut::new(bytes);
15538        #[allow(clippy::absurd_extreme_comparisons)]
15539        #[allow(unused_comparisons)]
15540        if __tmp.remaining() < Self::ENCODED_LEN {
15541            panic!(
15542                "buffer is too small (need {} bytes, but got {})",
15543                Self::ENCODED_LEN,
15544                __tmp.remaining(),
15545            )
15546        }
15547        __tmp.put_u64_le(self.time_usec);
15548        __tmp.put_i32_le(self.lat);
15549        __tmp.put_i32_le(self.lon);
15550        __tmp.put_i32_le(self.alt);
15551        __tmp.put_u16_le(self.eph);
15552        __tmp.put_u16_le(self.epv);
15553        __tmp.put_u16_le(self.vel);
15554        __tmp.put_u16_le(self.cog);
15555        __tmp.put_u8(self.fix_type as u8);
15556        __tmp.put_u8(self.satellites_visible);
15557        if matches!(version, MavlinkVersion::V2) {
15558            __tmp.put_i32_le(self.alt_ellipsoid);
15559            __tmp.put_u32_le(self.h_acc);
15560            __tmp.put_u32_le(self.v_acc);
15561            __tmp.put_u32_le(self.vel_acc);
15562            __tmp.put_u32_le(self.hdg_acc);
15563            __tmp.put_u16_le(self.yaw);
15564            let len = __tmp.len();
15565            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15566        } else {
15567            __tmp.len()
15568        }
15569    }
15570}
15571#[doc = "RTCM message for injecting into the onboard GPS (used for DGPS)."]
15572#[doc = ""]
15573#[doc = "ID: 233"]
15574#[derive(Debug, Clone, PartialEq)]
15575#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15576#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15577#[cfg_attr(feature = "ts", derive(TS))]
15578#[cfg_attr(feature = "ts", ts(export))]
15579pub struct GPS_RTCM_DATA_DATA {
15580    #[doc = "LSB: 1 means message is fragmented, next 2 bits are the fragment ID, the remaining 5 bits are used for the sequence ID. Messages are only to be flushed to the GPS when the entire message has been reconstructed on the autopilot. The fragment ID specifies which order the fragments should be assembled into a buffer, while the sequence ID is used to detect a mismatch between different buffers. The buffer is considered fully reconstructed when either all 4 fragments are present, or all the fragments before the first fragment with a non full payload is received. This management is used to ensure that normal GPS operation doesn't corrupt RTCM data, and to recover from a unreliable transport delivery order."]
15581    pub flags: u8,
15582    #[doc = "data length"]
15583    pub len: u8,
15584    #[doc = "RTCM message (may be fragmented)"]
15585    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15586    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15587    pub data: [u8; 180],
15588}
15589impl GPS_RTCM_DATA_DATA {
15590    pub const ENCODED_LEN: usize = 182usize;
15591    pub const DEFAULT: Self = Self {
15592        flags: 0_u8,
15593        len: 0_u8,
15594        data: [0_u8; 180usize],
15595    };
15596    #[cfg(feature = "arbitrary")]
15597    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15598        use arbitrary::{Arbitrary, Unstructured};
15599        let mut buf = [0u8; 1024];
15600        rng.fill_bytes(&mut buf);
15601        let mut unstructured = Unstructured::new(&buf);
15602        Self::arbitrary(&mut unstructured).unwrap_or_default()
15603    }
15604}
15605impl Default for GPS_RTCM_DATA_DATA {
15606    fn default() -> Self {
15607        Self::DEFAULT.clone()
15608    }
15609}
15610impl MessageData for GPS_RTCM_DATA_DATA {
15611    type Message = MavMessage;
15612    const ID: u32 = 233u32;
15613    const NAME: &'static str = "GPS_RTCM_DATA";
15614    const EXTRA_CRC: u8 = 35u8;
15615    const ENCODED_LEN: usize = 182usize;
15616    fn deser(
15617        _version: MavlinkVersion,
15618        __input: &[u8],
15619    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15620        let avail_len = __input.len();
15621        let mut payload_buf = [0; Self::ENCODED_LEN];
15622        let mut buf = if avail_len < Self::ENCODED_LEN {
15623            payload_buf[0..avail_len].copy_from_slice(__input);
15624            Bytes::new(&payload_buf)
15625        } else {
15626            Bytes::new(__input)
15627        };
15628        let mut __struct = Self::default();
15629        __struct.flags = buf.get_u8();
15630        __struct.len = buf.get_u8();
15631        for v in &mut __struct.data {
15632            let val = buf.get_u8();
15633            *v = val;
15634        }
15635        Ok(__struct)
15636    }
15637    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15638        let mut __tmp = BytesMut::new(bytes);
15639        #[allow(clippy::absurd_extreme_comparisons)]
15640        #[allow(unused_comparisons)]
15641        if __tmp.remaining() < Self::ENCODED_LEN {
15642            panic!(
15643                "buffer is too small (need {} bytes, but got {})",
15644                Self::ENCODED_LEN,
15645                __tmp.remaining(),
15646            )
15647        }
15648        __tmp.put_u8(self.flags);
15649        __tmp.put_u8(self.len);
15650        for val in &self.data {
15651            __tmp.put_u8(*val);
15652        }
15653        if matches!(version, MavlinkVersion::V2) {
15654            let len = __tmp.len();
15655            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15656        } else {
15657            __tmp.len()
15658        }
15659    }
15660}
15661#[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
15662#[doc = ""]
15663#[doc = "ID: 127"]
15664#[derive(Debug, Clone, PartialEq)]
15665#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15666#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15667#[cfg_attr(feature = "ts", derive(TS))]
15668#[cfg_attr(feature = "ts", ts(export))]
15669pub struct GPS_RTK_DATA {
15670    #[doc = "Time since boot of last baseline message received."]
15671    pub time_last_baseline_ms: u32,
15672    #[doc = "GPS Time of Week of last baseline"]
15673    pub tow: u32,
15674    #[doc = "Current baseline in ECEF x or NED north component."]
15675    pub baseline_a_mm: i32,
15676    #[doc = "Current baseline in ECEF y or NED east component."]
15677    pub baseline_b_mm: i32,
15678    #[doc = "Current baseline in ECEF z or NED down component."]
15679    pub baseline_c_mm: i32,
15680    #[doc = "Current estimate of baseline accuracy."]
15681    pub accuracy: u32,
15682    #[doc = "Current number of integer ambiguity hypotheses."]
15683    pub iar_num_hypotheses: i32,
15684    #[doc = "GPS Week Number of last baseline"]
15685    pub wn: u16,
15686    #[doc = "Identification of connected RTK receiver."]
15687    pub rtk_receiver_id: u8,
15688    #[doc = "GPS-specific health report for RTK data."]
15689    pub rtk_health: u8,
15690    #[doc = "Rate of baseline messages being received by GPS"]
15691    pub rtk_rate: u8,
15692    #[doc = "Current number of sats used for RTK calculation."]
15693    pub nsats: u8,
15694    #[doc = "Coordinate system of baseline"]
15695    pub baseline_coords_type: RtkBaselineCoordinateSystem,
15696}
15697impl GPS_RTK_DATA {
15698    pub const ENCODED_LEN: usize = 35usize;
15699    pub const DEFAULT: Self = Self {
15700        time_last_baseline_ms: 0_u32,
15701        tow: 0_u32,
15702        baseline_a_mm: 0_i32,
15703        baseline_b_mm: 0_i32,
15704        baseline_c_mm: 0_i32,
15705        accuracy: 0_u32,
15706        iar_num_hypotheses: 0_i32,
15707        wn: 0_u16,
15708        rtk_receiver_id: 0_u8,
15709        rtk_health: 0_u8,
15710        rtk_rate: 0_u8,
15711        nsats: 0_u8,
15712        baseline_coords_type: RtkBaselineCoordinateSystem::DEFAULT,
15713    };
15714    #[cfg(feature = "arbitrary")]
15715    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15716        use arbitrary::{Arbitrary, Unstructured};
15717        let mut buf = [0u8; 1024];
15718        rng.fill_bytes(&mut buf);
15719        let mut unstructured = Unstructured::new(&buf);
15720        Self::arbitrary(&mut unstructured).unwrap_or_default()
15721    }
15722}
15723impl Default for GPS_RTK_DATA {
15724    fn default() -> Self {
15725        Self::DEFAULT.clone()
15726    }
15727}
15728impl MessageData for GPS_RTK_DATA {
15729    type Message = MavMessage;
15730    const ID: u32 = 127u32;
15731    const NAME: &'static str = "GPS_RTK";
15732    const EXTRA_CRC: u8 = 25u8;
15733    const ENCODED_LEN: usize = 35usize;
15734    fn deser(
15735        _version: MavlinkVersion,
15736        __input: &[u8],
15737    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15738        let avail_len = __input.len();
15739        let mut payload_buf = [0; Self::ENCODED_LEN];
15740        let mut buf = if avail_len < Self::ENCODED_LEN {
15741            payload_buf[0..avail_len].copy_from_slice(__input);
15742            Bytes::new(&payload_buf)
15743        } else {
15744            Bytes::new(__input)
15745        };
15746        let mut __struct = Self::default();
15747        __struct.time_last_baseline_ms = buf.get_u32_le();
15748        __struct.tow = buf.get_u32_le();
15749        __struct.baseline_a_mm = buf.get_i32_le();
15750        __struct.baseline_b_mm = buf.get_i32_le();
15751        __struct.baseline_c_mm = buf.get_i32_le();
15752        __struct.accuracy = buf.get_u32_le();
15753        __struct.iar_num_hypotheses = buf.get_i32_le();
15754        __struct.wn = buf.get_u16_le();
15755        __struct.rtk_receiver_id = buf.get_u8();
15756        __struct.rtk_health = buf.get_u8();
15757        __struct.rtk_rate = buf.get_u8();
15758        __struct.nsats = buf.get_u8();
15759        let tmp = buf.get_u8();
15760        __struct.baseline_coords_type =
15761            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15762                enum_type: "RtkBaselineCoordinateSystem",
15763                value: tmp as u32,
15764            })?;
15765        Ok(__struct)
15766    }
15767    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15768        let mut __tmp = BytesMut::new(bytes);
15769        #[allow(clippy::absurd_extreme_comparisons)]
15770        #[allow(unused_comparisons)]
15771        if __tmp.remaining() < Self::ENCODED_LEN {
15772            panic!(
15773                "buffer is too small (need {} bytes, but got {})",
15774                Self::ENCODED_LEN,
15775                __tmp.remaining(),
15776            )
15777        }
15778        __tmp.put_u32_le(self.time_last_baseline_ms);
15779        __tmp.put_u32_le(self.tow);
15780        __tmp.put_i32_le(self.baseline_a_mm);
15781        __tmp.put_i32_le(self.baseline_b_mm);
15782        __tmp.put_i32_le(self.baseline_c_mm);
15783        __tmp.put_u32_le(self.accuracy);
15784        __tmp.put_i32_le(self.iar_num_hypotheses);
15785        __tmp.put_u16_le(self.wn);
15786        __tmp.put_u8(self.rtk_receiver_id);
15787        __tmp.put_u8(self.rtk_health);
15788        __tmp.put_u8(self.rtk_rate);
15789        __tmp.put_u8(self.nsats);
15790        __tmp.put_u8(self.baseline_coords_type as u8);
15791        if matches!(version, MavlinkVersion::V2) {
15792            let len = __tmp.len();
15793            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15794        } else {
15795            __tmp.len()
15796        }
15797    }
15798}
15799#[doc = "The positioning status, as reported by GPS. This message is intended to display status information about each satellite visible to the receiver. See message GLOBAL_POSITION_INT for the global position estimate. This message can contain information for up to 20 satellites."]
15800#[doc = ""]
15801#[doc = "ID: 25"]
15802#[derive(Debug, Clone, PartialEq)]
15803#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15804#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15805#[cfg_attr(feature = "ts", derive(TS))]
15806#[cfg_attr(feature = "ts", ts(export))]
15807pub struct GPS_STATUS_DATA {
15808    #[doc = "Number of satellites visible"]
15809    pub satellites_visible: u8,
15810    #[doc = "Global satellite ID"]
15811    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15812    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15813    pub satellite_prn: [u8; 20],
15814    #[doc = "0: Satellite not used, 1: used for localization"]
15815    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15816    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15817    pub satellite_used: [u8; 20],
15818    #[doc = "Elevation (0: right on top of receiver, 90: on the horizon) of satellite"]
15819    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15820    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15821    pub satellite_elevation: [u8; 20],
15822    #[doc = "Direction of satellite, 0: 0 deg, 255: 360 deg."]
15823    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15824    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15825    pub satellite_azimuth: [u8; 20],
15826    #[doc = "Signal to noise ratio of satellite"]
15827    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15828    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15829    pub satellite_snr: [u8; 20],
15830}
15831impl GPS_STATUS_DATA {
15832    pub const ENCODED_LEN: usize = 101usize;
15833    pub const DEFAULT: Self = Self {
15834        satellites_visible: 0_u8,
15835        satellite_prn: [0_u8; 20usize],
15836        satellite_used: [0_u8; 20usize],
15837        satellite_elevation: [0_u8; 20usize],
15838        satellite_azimuth: [0_u8; 20usize],
15839        satellite_snr: [0_u8; 20usize],
15840    };
15841    #[cfg(feature = "arbitrary")]
15842    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15843        use arbitrary::{Arbitrary, Unstructured};
15844        let mut buf = [0u8; 1024];
15845        rng.fill_bytes(&mut buf);
15846        let mut unstructured = Unstructured::new(&buf);
15847        Self::arbitrary(&mut unstructured).unwrap_or_default()
15848    }
15849}
15850impl Default for GPS_STATUS_DATA {
15851    fn default() -> Self {
15852        Self::DEFAULT.clone()
15853    }
15854}
15855impl MessageData for GPS_STATUS_DATA {
15856    type Message = MavMessage;
15857    const ID: u32 = 25u32;
15858    const NAME: &'static str = "GPS_STATUS";
15859    const EXTRA_CRC: u8 = 23u8;
15860    const ENCODED_LEN: usize = 101usize;
15861    fn deser(
15862        _version: MavlinkVersion,
15863        __input: &[u8],
15864    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15865        let avail_len = __input.len();
15866        let mut payload_buf = [0; Self::ENCODED_LEN];
15867        let mut buf = if avail_len < Self::ENCODED_LEN {
15868            payload_buf[0..avail_len].copy_from_slice(__input);
15869            Bytes::new(&payload_buf)
15870        } else {
15871            Bytes::new(__input)
15872        };
15873        let mut __struct = Self::default();
15874        __struct.satellites_visible = buf.get_u8();
15875        for v in &mut __struct.satellite_prn {
15876            let val = buf.get_u8();
15877            *v = val;
15878        }
15879        for v in &mut __struct.satellite_used {
15880            let val = buf.get_u8();
15881            *v = val;
15882        }
15883        for v in &mut __struct.satellite_elevation {
15884            let val = buf.get_u8();
15885            *v = val;
15886        }
15887        for v in &mut __struct.satellite_azimuth {
15888            let val = buf.get_u8();
15889            *v = val;
15890        }
15891        for v in &mut __struct.satellite_snr {
15892            let val = buf.get_u8();
15893            *v = val;
15894        }
15895        Ok(__struct)
15896    }
15897    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15898        let mut __tmp = BytesMut::new(bytes);
15899        #[allow(clippy::absurd_extreme_comparisons)]
15900        #[allow(unused_comparisons)]
15901        if __tmp.remaining() < Self::ENCODED_LEN {
15902            panic!(
15903                "buffer is too small (need {} bytes, but got {})",
15904                Self::ENCODED_LEN,
15905                __tmp.remaining(),
15906            )
15907        }
15908        __tmp.put_u8(self.satellites_visible);
15909        for val in &self.satellite_prn {
15910            __tmp.put_u8(*val);
15911        }
15912        for val in &self.satellite_used {
15913            __tmp.put_u8(*val);
15914        }
15915        for val in &self.satellite_elevation {
15916            __tmp.put_u8(*val);
15917        }
15918        for val in &self.satellite_azimuth {
15919            __tmp.put_u8(*val);
15920        }
15921        for val in &self.satellite_snr {
15922            __tmp.put_u8(*val);
15923        }
15924        if matches!(version, MavlinkVersion::V2) {
15925            let len = __tmp.len();
15926            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15927        } else {
15928            __tmp.len()
15929        }
15930    }
15931}
15932#[doc = "Status of GSM modem (connected to onboard computer)."]
15933#[doc = ""]
15934#[doc = "ID: 8014"]
15935#[derive(Debug, Clone, PartialEq)]
15936#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15937#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15938#[cfg_attr(feature = "ts", derive(TS))]
15939#[cfg_attr(feature = "ts", ts(export))]
15940pub struct GSM_LINK_STATUS_DATA {
15941    #[doc = "Timestamp (of OBC)"]
15942    pub timestamp: u64,
15943    #[doc = "GSM modem used"]
15944    pub gsm_modem_type: GsmModemType,
15945    #[doc = "GSM link type"]
15946    pub gsm_link_type: GsmLinkType,
15947    #[doc = "RSSI as reported by modem (unconverted)"]
15948    pub rssi: u8,
15949    #[doc = "RSRP (LTE) or RSCP (WCDMA) as reported by modem (unconverted)"]
15950    pub rsrp_rscp: u8,
15951    #[doc = "SINR (LTE) or ECIO (WCDMA) as reported by modem (unconverted)"]
15952    pub sinr_ecio: u8,
15953    #[doc = "RSRQ (LTE only) as reported by modem (unconverted)"]
15954    pub rsrq: u8,
15955}
15956impl GSM_LINK_STATUS_DATA {
15957    pub const ENCODED_LEN: usize = 14usize;
15958    pub const DEFAULT: Self = Self {
15959        timestamp: 0_u64,
15960        gsm_modem_type: GsmModemType::DEFAULT,
15961        gsm_link_type: GsmLinkType::DEFAULT,
15962        rssi: 0_u8,
15963        rsrp_rscp: 0_u8,
15964        sinr_ecio: 0_u8,
15965        rsrq: 0_u8,
15966    };
15967    #[cfg(feature = "arbitrary")]
15968    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15969        use arbitrary::{Arbitrary, Unstructured};
15970        let mut buf = [0u8; 1024];
15971        rng.fill_bytes(&mut buf);
15972        let mut unstructured = Unstructured::new(&buf);
15973        Self::arbitrary(&mut unstructured).unwrap_or_default()
15974    }
15975}
15976impl Default for GSM_LINK_STATUS_DATA {
15977    fn default() -> Self {
15978        Self::DEFAULT.clone()
15979    }
15980}
15981impl MessageData for GSM_LINK_STATUS_DATA {
15982    type Message = MavMessage;
15983    const ID: u32 = 8014u32;
15984    const NAME: &'static str = "GSM_LINK_STATUS";
15985    const EXTRA_CRC: u8 = 200u8;
15986    const ENCODED_LEN: usize = 14usize;
15987    fn deser(
15988        _version: MavlinkVersion,
15989        __input: &[u8],
15990    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15991        let avail_len = __input.len();
15992        let mut payload_buf = [0; Self::ENCODED_LEN];
15993        let mut buf = if avail_len < Self::ENCODED_LEN {
15994            payload_buf[0..avail_len].copy_from_slice(__input);
15995            Bytes::new(&payload_buf)
15996        } else {
15997            Bytes::new(__input)
15998        };
15999        let mut __struct = Self::default();
16000        __struct.timestamp = buf.get_u64_le();
16001        let tmp = buf.get_u8();
16002        __struct.gsm_modem_type =
16003            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16004                enum_type: "GsmModemType",
16005                value: tmp as u32,
16006            })?;
16007        let tmp = buf.get_u8();
16008        __struct.gsm_link_type =
16009            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16010                enum_type: "GsmLinkType",
16011                value: tmp as u32,
16012            })?;
16013        __struct.rssi = buf.get_u8();
16014        __struct.rsrp_rscp = buf.get_u8();
16015        __struct.sinr_ecio = buf.get_u8();
16016        __struct.rsrq = buf.get_u8();
16017        Ok(__struct)
16018    }
16019    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16020        let mut __tmp = BytesMut::new(bytes);
16021        #[allow(clippy::absurd_extreme_comparisons)]
16022        #[allow(unused_comparisons)]
16023        if __tmp.remaining() < Self::ENCODED_LEN {
16024            panic!(
16025                "buffer is too small (need {} bytes, but got {})",
16026                Self::ENCODED_LEN,
16027                __tmp.remaining(),
16028            )
16029        }
16030        __tmp.put_u64_le(self.timestamp);
16031        __tmp.put_u8(self.gsm_modem_type as u8);
16032        __tmp.put_u8(self.gsm_link_type as u8);
16033        __tmp.put_u8(self.rssi);
16034        __tmp.put_u8(self.rsrp_rscp);
16035        __tmp.put_u8(self.sinr_ecio);
16036        __tmp.put_u8(self.rsrq);
16037        if matches!(version, MavlinkVersion::V2) {
16038            let len = __tmp.len();
16039            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16040        } else {
16041            __tmp.len()
16042        }
16043    }
16044}
16045#[doc = "The heartbeat message shows that a system or component is present and responding. The type and autopilot fields (along with the message component id), allow the receiving system to treat further messages from this system appropriately (e.g. by laying out the user interface based on the autopilot). This microservice is documented at <https://mavlink.io/en/services/heartbeat.html>."]
16046#[doc = ""]
16047#[doc = "ID: 0"]
16048#[derive(Debug, Clone, PartialEq)]
16049#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16050#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16051#[cfg_attr(feature = "ts", derive(TS))]
16052#[cfg_attr(feature = "ts", ts(export))]
16053pub struct HEARTBEAT_DATA {
16054    #[doc = "A bitfield for use for autopilot-specific flags"]
16055    pub custom_mode: u32,
16056    #[doc = "Vehicle or component type. For a flight controller component the vehicle type (quadrotor, helicopter, etc.). For other components the component type (e.g. camera, gimbal, etc.). This should be used in preference to component id for identifying the component type."]
16057    pub mavtype: MavType,
16058    #[doc = "Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers."]
16059    pub autopilot: MavAutopilot,
16060    #[doc = "System mode bitmap."]
16061    pub base_mode: MavModeFlag,
16062    #[doc = "System status flag."]
16063    pub system_status: MavState,
16064    #[doc = "MAVLink version, not writable by user, gets added by protocol because of magic data type: uint8_t_mavlink_version"]
16065    pub mavlink_version: u8,
16066}
16067impl HEARTBEAT_DATA {
16068    pub const ENCODED_LEN: usize = 9usize;
16069    pub const DEFAULT: Self = Self {
16070        custom_mode: 0_u32,
16071        mavtype: MavType::DEFAULT,
16072        autopilot: MavAutopilot::DEFAULT,
16073        base_mode: MavModeFlag::DEFAULT,
16074        system_status: MavState::DEFAULT,
16075        mavlink_version: MINOR_MAVLINK_VERSION,
16076    };
16077    #[cfg(feature = "arbitrary")]
16078    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16079        use arbitrary::{Arbitrary, Unstructured};
16080        let mut buf = [0u8; 1024];
16081        rng.fill_bytes(&mut buf);
16082        let mut unstructured = Unstructured::new(&buf);
16083        Self::arbitrary(&mut unstructured).unwrap_or_default()
16084    }
16085}
16086impl Default for HEARTBEAT_DATA {
16087    fn default() -> Self {
16088        Self::DEFAULT.clone()
16089    }
16090}
16091impl MessageData for HEARTBEAT_DATA {
16092    type Message = MavMessage;
16093    const ID: u32 = 0u32;
16094    const NAME: &'static str = "HEARTBEAT";
16095    const EXTRA_CRC: u8 = 50u8;
16096    const ENCODED_LEN: usize = 9usize;
16097    fn deser(
16098        _version: MavlinkVersion,
16099        __input: &[u8],
16100    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16101        let avail_len = __input.len();
16102        let mut payload_buf = [0; Self::ENCODED_LEN];
16103        let mut buf = if avail_len < Self::ENCODED_LEN {
16104            payload_buf[0..avail_len].copy_from_slice(__input);
16105            Bytes::new(&payload_buf)
16106        } else {
16107            Bytes::new(__input)
16108        };
16109        let mut __struct = Self::default();
16110        __struct.custom_mode = buf.get_u32_le();
16111        let tmp = buf.get_u8();
16112        __struct.mavtype =
16113            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16114                enum_type: "MavType",
16115                value: tmp as u32,
16116            })?;
16117        let tmp = buf.get_u8();
16118        __struct.autopilot =
16119            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16120                enum_type: "MavAutopilot",
16121                value: tmp as u32,
16122            })?;
16123        let tmp = buf.get_u8();
16124        __struct.base_mode = MavModeFlag::from_bits(tmp & MavModeFlag::all().bits()).ok_or(
16125            ::mavlink_core::error::ParserError::InvalidFlag {
16126                flag_type: "MavModeFlag",
16127                value: tmp as u32,
16128            },
16129        )?;
16130        let tmp = buf.get_u8();
16131        __struct.system_status =
16132            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16133                enum_type: "MavState",
16134                value: tmp as u32,
16135            })?;
16136        __struct.mavlink_version = buf.get_u8();
16137        Ok(__struct)
16138    }
16139    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16140        let mut __tmp = BytesMut::new(bytes);
16141        #[allow(clippy::absurd_extreme_comparisons)]
16142        #[allow(unused_comparisons)]
16143        if __tmp.remaining() < Self::ENCODED_LEN {
16144            panic!(
16145                "buffer is too small (need {} bytes, but got {})",
16146                Self::ENCODED_LEN,
16147                __tmp.remaining(),
16148            )
16149        }
16150        __tmp.put_u32_le(self.custom_mode);
16151        __tmp.put_u8(self.mavtype as u8);
16152        __tmp.put_u8(self.autopilot as u8);
16153        __tmp.put_u8(self.base_mode.bits());
16154        __tmp.put_u8(self.system_status as u8);
16155        __tmp.put_u8(self.mavlink_version);
16156        if matches!(version, MavlinkVersion::V2) {
16157            let len = __tmp.len();
16158            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16159        } else {
16160            __tmp.len()
16161        }
16162    }
16163}
16164#[doc = "The IMU readings in SI units in NED body frame."]
16165#[doc = ""]
16166#[doc = "ID: 105"]
16167#[derive(Debug, Clone, PartialEq)]
16168#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16169#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16170#[cfg_attr(feature = "ts", derive(TS))]
16171#[cfg_attr(feature = "ts", ts(export))]
16172pub struct HIGHRES_IMU_DATA {
16173    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16174    pub time_usec: u64,
16175    #[doc = "X acceleration"]
16176    pub xacc: f32,
16177    #[doc = "Y acceleration"]
16178    pub yacc: f32,
16179    #[doc = "Z acceleration"]
16180    pub zacc: f32,
16181    #[doc = "Angular speed around X axis"]
16182    pub xgyro: f32,
16183    #[doc = "Angular speed around Y axis"]
16184    pub ygyro: f32,
16185    #[doc = "Angular speed around Z axis"]
16186    pub zgyro: f32,
16187    #[doc = "X Magnetic field"]
16188    pub xmag: f32,
16189    #[doc = "Y Magnetic field"]
16190    pub ymag: f32,
16191    #[doc = "Z Magnetic field"]
16192    pub zmag: f32,
16193    #[doc = "Absolute pressure"]
16194    pub abs_pressure: f32,
16195    #[doc = "Differential pressure"]
16196    pub diff_pressure: f32,
16197    #[doc = "Altitude calculated from pressure"]
16198    pub pressure_alt: f32,
16199    #[doc = "Temperature"]
16200    pub temperature: f32,
16201    #[doc = "Bitmap for fields that have updated since last message"]
16202    pub fields_updated: HighresImuUpdatedFlags,
16203    #[doc = "Id. Ids are numbered from 0 and map to IMUs numbered from 1 (e.g. IMU1 will have a message with id=0)"]
16204    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16205    pub id: u8,
16206}
16207impl HIGHRES_IMU_DATA {
16208    pub const ENCODED_LEN: usize = 63usize;
16209    pub const DEFAULT: Self = Self {
16210        time_usec: 0_u64,
16211        xacc: 0.0_f32,
16212        yacc: 0.0_f32,
16213        zacc: 0.0_f32,
16214        xgyro: 0.0_f32,
16215        ygyro: 0.0_f32,
16216        zgyro: 0.0_f32,
16217        xmag: 0.0_f32,
16218        ymag: 0.0_f32,
16219        zmag: 0.0_f32,
16220        abs_pressure: 0.0_f32,
16221        diff_pressure: 0.0_f32,
16222        pressure_alt: 0.0_f32,
16223        temperature: 0.0_f32,
16224        fields_updated: HighresImuUpdatedFlags::DEFAULT,
16225        id: 0_u8,
16226    };
16227    #[cfg(feature = "arbitrary")]
16228    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16229        use arbitrary::{Arbitrary, Unstructured};
16230        let mut buf = [0u8; 1024];
16231        rng.fill_bytes(&mut buf);
16232        let mut unstructured = Unstructured::new(&buf);
16233        Self::arbitrary(&mut unstructured).unwrap_or_default()
16234    }
16235}
16236impl Default for HIGHRES_IMU_DATA {
16237    fn default() -> Self {
16238        Self::DEFAULT.clone()
16239    }
16240}
16241impl MessageData for HIGHRES_IMU_DATA {
16242    type Message = MavMessage;
16243    const ID: u32 = 105u32;
16244    const NAME: &'static str = "HIGHRES_IMU";
16245    const EXTRA_CRC: u8 = 93u8;
16246    const ENCODED_LEN: usize = 63usize;
16247    fn deser(
16248        _version: MavlinkVersion,
16249        __input: &[u8],
16250    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16251        let avail_len = __input.len();
16252        let mut payload_buf = [0; Self::ENCODED_LEN];
16253        let mut buf = if avail_len < Self::ENCODED_LEN {
16254            payload_buf[0..avail_len].copy_from_slice(__input);
16255            Bytes::new(&payload_buf)
16256        } else {
16257            Bytes::new(__input)
16258        };
16259        let mut __struct = Self::default();
16260        __struct.time_usec = buf.get_u64_le();
16261        __struct.xacc = buf.get_f32_le();
16262        __struct.yacc = buf.get_f32_le();
16263        __struct.zacc = buf.get_f32_le();
16264        __struct.xgyro = buf.get_f32_le();
16265        __struct.ygyro = buf.get_f32_le();
16266        __struct.zgyro = buf.get_f32_le();
16267        __struct.xmag = buf.get_f32_le();
16268        __struct.ymag = buf.get_f32_le();
16269        __struct.zmag = buf.get_f32_le();
16270        __struct.abs_pressure = buf.get_f32_le();
16271        __struct.diff_pressure = buf.get_f32_le();
16272        __struct.pressure_alt = buf.get_f32_le();
16273        __struct.temperature = buf.get_f32_le();
16274        let tmp = buf.get_u16_le();
16275        __struct.fields_updated = HighresImuUpdatedFlags::from_bits(
16276            tmp & HighresImuUpdatedFlags::all().bits(),
16277        )
16278        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
16279            flag_type: "HighresImuUpdatedFlags",
16280            value: tmp as u32,
16281        })?;
16282        __struct.id = buf.get_u8();
16283        Ok(__struct)
16284    }
16285    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16286        let mut __tmp = BytesMut::new(bytes);
16287        #[allow(clippy::absurd_extreme_comparisons)]
16288        #[allow(unused_comparisons)]
16289        if __tmp.remaining() < Self::ENCODED_LEN {
16290            panic!(
16291                "buffer is too small (need {} bytes, but got {})",
16292                Self::ENCODED_LEN,
16293                __tmp.remaining(),
16294            )
16295        }
16296        __tmp.put_u64_le(self.time_usec);
16297        __tmp.put_f32_le(self.xacc);
16298        __tmp.put_f32_le(self.yacc);
16299        __tmp.put_f32_le(self.zacc);
16300        __tmp.put_f32_le(self.xgyro);
16301        __tmp.put_f32_le(self.ygyro);
16302        __tmp.put_f32_le(self.zgyro);
16303        __tmp.put_f32_le(self.xmag);
16304        __tmp.put_f32_le(self.ymag);
16305        __tmp.put_f32_le(self.zmag);
16306        __tmp.put_f32_le(self.abs_pressure);
16307        __tmp.put_f32_le(self.diff_pressure);
16308        __tmp.put_f32_le(self.pressure_alt);
16309        __tmp.put_f32_le(self.temperature);
16310        __tmp.put_u16_le(self.fields_updated.bits());
16311        if matches!(version, MavlinkVersion::V2) {
16312            __tmp.put_u8(self.id);
16313            let len = __tmp.len();
16314            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16315        } else {
16316            __tmp.len()
16317        }
16318    }
16319}
16320#[deprecated = " See `HIGH_LATENCY2` (Deprecated since 2020-10)"]
16321#[doc = "Message appropriate for high latency connections like Iridium."]
16322#[doc = ""]
16323#[doc = "ID: 234"]
16324#[derive(Debug, Clone, PartialEq)]
16325#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16326#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16327#[cfg_attr(feature = "ts", derive(TS))]
16328#[cfg_attr(feature = "ts", ts(export))]
16329pub struct HIGH_LATENCY_DATA {
16330    #[doc = "A bitfield for use for autopilot-specific flags."]
16331    pub custom_mode: u32,
16332    #[doc = "Latitude"]
16333    pub latitude: i32,
16334    #[doc = "Longitude"]
16335    pub longitude: i32,
16336    #[doc = "roll"]
16337    pub roll: i16,
16338    #[doc = "pitch"]
16339    pub pitch: i16,
16340    #[doc = "heading"]
16341    pub heading: u16,
16342    #[doc = "heading setpoint"]
16343    pub heading_sp: i16,
16344    #[doc = "Altitude above mean sea level"]
16345    pub altitude_amsl: i16,
16346    #[doc = "Altitude setpoint relative to the home position"]
16347    pub altitude_sp: i16,
16348    #[doc = "distance to target"]
16349    pub wp_distance: u16,
16350    #[doc = "Bitmap of enabled system modes."]
16351    pub base_mode: MavModeFlag,
16352    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
16353    pub landed_state: MavLandedState,
16354    #[doc = "throttle (percentage)"]
16355    pub throttle: i8,
16356    #[doc = "airspeed"]
16357    pub airspeed: u8,
16358    #[doc = "airspeed setpoint"]
16359    pub airspeed_sp: u8,
16360    #[doc = "groundspeed"]
16361    pub groundspeed: u8,
16362    #[doc = "climb rate"]
16363    pub climb_rate: i8,
16364    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
16365    pub gps_nsat: u8,
16366    #[doc = "GPS Fix type."]
16367    pub gps_fix_type: GpsFixType,
16368    #[doc = "Remaining battery (percentage)"]
16369    pub battery_remaining: u8,
16370    #[doc = "Autopilot temperature (degrees C)"]
16371    pub temperature: i8,
16372    #[doc = "Air temperature (degrees C) from airspeed sensor"]
16373    pub temperature_air: i8,
16374    #[doc = "failsafe (each bit represents a failsafe where 0=ok, 1=failsafe active (bit0:RC, bit1:batt, bit2:GPS, bit3:GCS, bit4:fence)"]
16375    pub failsafe: u8,
16376    #[doc = "current waypoint number"]
16377    pub wp_num: u8,
16378}
16379impl HIGH_LATENCY_DATA {
16380    pub const ENCODED_LEN: usize = 40usize;
16381    pub const DEFAULT: Self = Self {
16382        custom_mode: 0_u32,
16383        latitude: 0_i32,
16384        longitude: 0_i32,
16385        roll: 0_i16,
16386        pitch: 0_i16,
16387        heading: 0_u16,
16388        heading_sp: 0_i16,
16389        altitude_amsl: 0_i16,
16390        altitude_sp: 0_i16,
16391        wp_distance: 0_u16,
16392        base_mode: MavModeFlag::DEFAULT,
16393        landed_state: MavLandedState::DEFAULT,
16394        throttle: 0_i8,
16395        airspeed: 0_u8,
16396        airspeed_sp: 0_u8,
16397        groundspeed: 0_u8,
16398        climb_rate: 0_i8,
16399        gps_nsat: 0_u8,
16400        gps_fix_type: GpsFixType::DEFAULT,
16401        battery_remaining: 0_u8,
16402        temperature: 0_i8,
16403        temperature_air: 0_i8,
16404        failsafe: 0_u8,
16405        wp_num: 0_u8,
16406    };
16407    #[cfg(feature = "arbitrary")]
16408    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16409        use arbitrary::{Arbitrary, Unstructured};
16410        let mut buf = [0u8; 1024];
16411        rng.fill_bytes(&mut buf);
16412        let mut unstructured = Unstructured::new(&buf);
16413        Self::arbitrary(&mut unstructured).unwrap_or_default()
16414    }
16415}
16416impl Default for HIGH_LATENCY_DATA {
16417    fn default() -> Self {
16418        Self::DEFAULT.clone()
16419    }
16420}
16421impl MessageData for HIGH_LATENCY_DATA {
16422    type Message = MavMessage;
16423    const ID: u32 = 234u32;
16424    const NAME: &'static str = "HIGH_LATENCY";
16425    const EXTRA_CRC: u8 = 150u8;
16426    const ENCODED_LEN: usize = 40usize;
16427    fn deser(
16428        _version: MavlinkVersion,
16429        __input: &[u8],
16430    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16431        let avail_len = __input.len();
16432        let mut payload_buf = [0; Self::ENCODED_LEN];
16433        let mut buf = if avail_len < Self::ENCODED_LEN {
16434            payload_buf[0..avail_len].copy_from_slice(__input);
16435            Bytes::new(&payload_buf)
16436        } else {
16437            Bytes::new(__input)
16438        };
16439        let mut __struct = Self::default();
16440        __struct.custom_mode = buf.get_u32_le();
16441        __struct.latitude = buf.get_i32_le();
16442        __struct.longitude = buf.get_i32_le();
16443        __struct.roll = buf.get_i16_le();
16444        __struct.pitch = buf.get_i16_le();
16445        __struct.heading = buf.get_u16_le();
16446        __struct.heading_sp = buf.get_i16_le();
16447        __struct.altitude_amsl = buf.get_i16_le();
16448        __struct.altitude_sp = buf.get_i16_le();
16449        __struct.wp_distance = buf.get_u16_le();
16450        let tmp = buf.get_u8();
16451        __struct.base_mode = MavModeFlag::from_bits(tmp & MavModeFlag::all().bits()).ok_or(
16452            ::mavlink_core::error::ParserError::InvalidFlag {
16453                flag_type: "MavModeFlag",
16454                value: tmp as u32,
16455            },
16456        )?;
16457        let tmp = buf.get_u8();
16458        __struct.landed_state =
16459            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16460                enum_type: "MavLandedState",
16461                value: tmp as u32,
16462            })?;
16463        __struct.throttle = buf.get_i8();
16464        __struct.airspeed = buf.get_u8();
16465        __struct.airspeed_sp = buf.get_u8();
16466        __struct.groundspeed = buf.get_u8();
16467        __struct.climb_rate = buf.get_i8();
16468        __struct.gps_nsat = buf.get_u8();
16469        let tmp = buf.get_u8();
16470        __struct.gps_fix_type =
16471            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16472                enum_type: "GpsFixType",
16473                value: tmp as u32,
16474            })?;
16475        __struct.battery_remaining = buf.get_u8();
16476        __struct.temperature = buf.get_i8();
16477        __struct.temperature_air = buf.get_i8();
16478        __struct.failsafe = buf.get_u8();
16479        __struct.wp_num = buf.get_u8();
16480        Ok(__struct)
16481    }
16482    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16483        let mut __tmp = BytesMut::new(bytes);
16484        #[allow(clippy::absurd_extreme_comparisons)]
16485        #[allow(unused_comparisons)]
16486        if __tmp.remaining() < Self::ENCODED_LEN {
16487            panic!(
16488                "buffer is too small (need {} bytes, but got {})",
16489                Self::ENCODED_LEN,
16490                __tmp.remaining(),
16491            )
16492        }
16493        __tmp.put_u32_le(self.custom_mode);
16494        __tmp.put_i32_le(self.latitude);
16495        __tmp.put_i32_le(self.longitude);
16496        __tmp.put_i16_le(self.roll);
16497        __tmp.put_i16_le(self.pitch);
16498        __tmp.put_u16_le(self.heading);
16499        __tmp.put_i16_le(self.heading_sp);
16500        __tmp.put_i16_le(self.altitude_amsl);
16501        __tmp.put_i16_le(self.altitude_sp);
16502        __tmp.put_u16_le(self.wp_distance);
16503        __tmp.put_u8(self.base_mode.bits());
16504        __tmp.put_u8(self.landed_state as u8);
16505        __tmp.put_i8(self.throttle);
16506        __tmp.put_u8(self.airspeed);
16507        __tmp.put_u8(self.airspeed_sp);
16508        __tmp.put_u8(self.groundspeed);
16509        __tmp.put_i8(self.climb_rate);
16510        __tmp.put_u8(self.gps_nsat);
16511        __tmp.put_u8(self.gps_fix_type as u8);
16512        __tmp.put_u8(self.battery_remaining);
16513        __tmp.put_i8(self.temperature);
16514        __tmp.put_i8(self.temperature_air);
16515        __tmp.put_u8(self.failsafe);
16516        __tmp.put_u8(self.wp_num);
16517        if matches!(version, MavlinkVersion::V2) {
16518            let len = __tmp.len();
16519            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16520        } else {
16521            __tmp.len()
16522        }
16523    }
16524}
16525#[doc = "Message appropriate for high latency connections like Iridium (version 2)."]
16526#[doc = ""]
16527#[doc = "ID: 235"]
16528#[derive(Debug, Clone, PartialEq)]
16529#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16530#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16531#[cfg_attr(feature = "ts", derive(TS))]
16532#[cfg_attr(feature = "ts", ts(export))]
16533pub struct HIGH_LATENCY2_DATA {
16534    #[doc = "Timestamp (milliseconds since boot or Unix epoch)"]
16535    pub timestamp: u32,
16536    #[doc = "Latitude"]
16537    pub latitude: i32,
16538    #[doc = "Longitude"]
16539    pub longitude: i32,
16540    #[doc = "A bitfield for use for autopilot-specific flags (2 byte version)."]
16541    pub custom_mode: u16,
16542    #[doc = "Altitude above mean sea level"]
16543    pub altitude: i16,
16544    #[doc = "Altitude setpoint"]
16545    pub target_altitude: i16,
16546    #[doc = "Distance to target waypoint or position"]
16547    pub target_distance: u16,
16548    #[doc = "Current waypoint number"]
16549    pub wp_num: u16,
16550    #[doc = "Bitmap of failure flags."]
16551    pub failure_flags: HlFailureFlag,
16552    #[doc = "Type of the MAV (quadrotor, helicopter, etc.)"]
16553    pub mavtype: MavType,
16554    #[doc = "Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers."]
16555    pub autopilot: MavAutopilot,
16556    #[doc = "Heading"]
16557    pub heading: u8,
16558    #[doc = "Heading setpoint"]
16559    pub target_heading: u8,
16560    #[doc = "Throttle"]
16561    pub throttle: u8,
16562    #[doc = "Airspeed"]
16563    pub airspeed: u8,
16564    #[doc = "Airspeed setpoint"]
16565    pub airspeed_sp: u8,
16566    #[doc = "Groundspeed"]
16567    pub groundspeed: u8,
16568    #[doc = "Windspeed"]
16569    pub windspeed: u8,
16570    #[doc = "Wind heading"]
16571    pub wind_heading: u8,
16572    #[doc = "Maximum error horizontal position since last message"]
16573    pub eph: u8,
16574    #[doc = "Maximum error vertical position since last message"]
16575    pub epv: u8,
16576    #[doc = "Air temperature"]
16577    pub temperature_air: i8,
16578    #[doc = "Maximum climb rate magnitude since last message"]
16579    pub climb_rate: i8,
16580    #[doc = "Battery level (-1 if field not provided)."]
16581    pub battery: i8,
16582    #[doc = "Field for custom payload."]
16583    pub custom0: i8,
16584    #[doc = "Field for custom payload."]
16585    pub custom1: i8,
16586    #[doc = "Field for custom payload."]
16587    pub custom2: i8,
16588}
16589impl HIGH_LATENCY2_DATA {
16590    pub const ENCODED_LEN: usize = 42usize;
16591    pub const DEFAULT: Self = Self {
16592        timestamp: 0_u32,
16593        latitude: 0_i32,
16594        longitude: 0_i32,
16595        custom_mode: 0_u16,
16596        altitude: 0_i16,
16597        target_altitude: 0_i16,
16598        target_distance: 0_u16,
16599        wp_num: 0_u16,
16600        failure_flags: HlFailureFlag::DEFAULT,
16601        mavtype: MavType::DEFAULT,
16602        autopilot: MavAutopilot::DEFAULT,
16603        heading: 0_u8,
16604        target_heading: 0_u8,
16605        throttle: 0_u8,
16606        airspeed: 0_u8,
16607        airspeed_sp: 0_u8,
16608        groundspeed: 0_u8,
16609        windspeed: 0_u8,
16610        wind_heading: 0_u8,
16611        eph: 0_u8,
16612        epv: 0_u8,
16613        temperature_air: 0_i8,
16614        climb_rate: 0_i8,
16615        battery: 0_i8,
16616        custom0: 0_i8,
16617        custom1: 0_i8,
16618        custom2: 0_i8,
16619    };
16620    #[cfg(feature = "arbitrary")]
16621    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16622        use arbitrary::{Arbitrary, Unstructured};
16623        let mut buf = [0u8; 1024];
16624        rng.fill_bytes(&mut buf);
16625        let mut unstructured = Unstructured::new(&buf);
16626        Self::arbitrary(&mut unstructured).unwrap_or_default()
16627    }
16628}
16629impl Default for HIGH_LATENCY2_DATA {
16630    fn default() -> Self {
16631        Self::DEFAULT.clone()
16632    }
16633}
16634impl MessageData for HIGH_LATENCY2_DATA {
16635    type Message = MavMessage;
16636    const ID: u32 = 235u32;
16637    const NAME: &'static str = "HIGH_LATENCY2";
16638    const EXTRA_CRC: u8 = 179u8;
16639    const ENCODED_LEN: usize = 42usize;
16640    fn deser(
16641        _version: MavlinkVersion,
16642        __input: &[u8],
16643    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16644        let avail_len = __input.len();
16645        let mut payload_buf = [0; Self::ENCODED_LEN];
16646        let mut buf = if avail_len < Self::ENCODED_LEN {
16647            payload_buf[0..avail_len].copy_from_slice(__input);
16648            Bytes::new(&payload_buf)
16649        } else {
16650            Bytes::new(__input)
16651        };
16652        let mut __struct = Self::default();
16653        __struct.timestamp = buf.get_u32_le();
16654        __struct.latitude = buf.get_i32_le();
16655        __struct.longitude = buf.get_i32_le();
16656        __struct.custom_mode = buf.get_u16_le();
16657        __struct.altitude = buf.get_i16_le();
16658        __struct.target_altitude = buf.get_i16_le();
16659        __struct.target_distance = buf.get_u16_le();
16660        __struct.wp_num = buf.get_u16_le();
16661        let tmp = buf.get_u16_le();
16662        __struct.failure_flags = HlFailureFlag::from_bits(tmp & HlFailureFlag::all().bits())
16663            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
16664                flag_type: "HlFailureFlag",
16665                value: tmp as u32,
16666            })?;
16667        let tmp = buf.get_u8();
16668        __struct.mavtype =
16669            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16670                enum_type: "MavType",
16671                value: tmp as u32,
16672            })?;
16673        let tmp = buf.get_u8();
16674        __struct.autopilot =
16675            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16676                enum_type: "MavAutopilot",
16677                value: tmp as u32,
16678            })?;
16679        __struct.heading = buf.get_u8();
16680        __struct.target_heading = buf.get_u8();
16681        __struct.throttle = buf.get_u8();
16682        __struct.airspeed = buf.get_u8();
16683        __struct.airspeed_sp = buf.get_u8();
16684        __struct.groundspeed = buf.get_u8();
16685        __struct.windspeed = buf.get_u8();
16686        __struct.wind_heading = buf.get_u8();
16687        __struct.eph = buf.get_u8();
16688        __struct.epv = buf.get_u8();
16689        __struct.temperature_air = buf.get_i8();
16690        __struct.climb_rate = buf.get_i8();
16691        __struct.battery = buf.get_i8();
16692        __struct.custom0 = buf.get_i8();
16693        __struct.custom1 = buf.get_i8();
16694        __struct.custom2 = buf.get_i8();
16695        Ok(__struct)
16696    }
16697    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16698        let mut __tmp = BytesMut::new(bytes);
16699        #[allow(clippy::absurd_extreme_comparisons)]
16700        #[allow(unused_comparisons)]
16701        if __tmp.remaining() < Self::ENCODED_LEN {
16702            panic!(
16703                "buffer is too small (need {} bytes, but got {})",
16704                Self::ENCODED_LEN,
16705                __tmp.remaining(),
16706            )
16707        }
16708        __tmp.put_u32_le(self.timestamp);
16709        __tmp.put_i32_le(self.latitude);
16710        __tmp.put_i32_le(self.longitude);
16711        __tmp.put_u16_le(self.custom_mode);
16712        __tmp.put_i16_le(self.altitude);
16713        __tmp.put_i16_le(self.target_altitude);
16714        __tmp.put_u16_le(self.target_distance);
16715        __tmp.put_u16_le(self.wp_num);
16716        __tmp.put_u16_le(self.failure_flags.bits());
16717        __tmp.put_u8(self.mavtype as u8);
16718        __tmp.put_u8(self.autopilot as u8);
16719        __tmp.put_u8(self.heading);
16720        __tmp.put_u8(self.target_heading);
16721        __tmp.put_u8(self.throttle);
16722        __tmp.put_u8(self.airspeed);
16723        __tmp.put_u8(self.airspeed_sp);
16724        __tmp.put_u8(self.groundspeed);
16725        __tmp.put_u8(self.windspeed);
16726        __tmp.put_u8(self.wind_heading);
16727        __tmp.put_u8(self.eph);
16728        __tmp.put_u8(self.epv);
16729        __tmp.put_i8(self.temperature_air);
16730        __tmp.put_i8(self.climb_rate);
16731        __tmp.put_i8(self.battery);
16732        __tmp.put_i8(self.custom0);
16733        __tmp.put_i8(self.custom1);
16734        __tmp.put_i8(self.custom2);
16735        if matches!(version, MavlinkVersion::V2) {
16736            let len = __tmp.len();
16737            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16738        } else {
16739            __tmp.len()
16740        }
16741    }
16742}
16743#[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_CONTROLS."]
16744#[doc = ""]
16745#[doc = "ID: 93"]
16746#[derive(Debug, Clone, PartialEq)]
16747#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16748#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16749#[cfg_attr(feature = "ts", derive(TS))]
16750#[cfg_attr(feature = "ts", ts(export))]
16751pub struct HIL_ACTUATOR_CONTROLS_DATA {
16752    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16753    pub time_usec: u64,
16754    #[doc = "Flags bitmask."]
16755    pub flags: HilActuatorControlsFlags,
16756    #[doc = "Control outputs -1 .. 1. Channel assignment depends on the simulated hardware."]
16757    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16758    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16759    pub controls: [f32; 16],
16760    #[doc = "System mode. Includes arming state."]
16761    pub mode: MavModeFlag,
16762}
16763impl HIL_ACTUATOR_CONTROLS_DATA {
16764    pub const ENCODED_LEN: usize = 81usize;
16765    pub const DEFAULT: Self = Self {
16766        time_usec: 0_u64,
16767        flags: HilActuatorControlsFlags::DEFAULT,
16768        controls: [0.0_f32; 16usize],
16769        mode: MavModeFlag::DEFAULT,
16770    };
16771    #[cfg(feature = "arbitrary")]
16772    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16773        use arbitrary::{Arbitrary, Unstructured};
16774        let mut buf = [0u8; 1024];
16775        rng.fill_bytes(&mut buf);
16776        let mut unstructured = Unstructured::new(&buf);
16777        Self::arbitrary(&mut unstructured).unwrap_or_default()
16778    }
16779}
16780impl Default for HIL_ACTUATOR_CONTROLS_DATA {
16781    fn default() -> Self {
16782        Self::DEFAULT.clone()
16783    }
16784}
16785impl MessageData for HIL_ACTUATOR_CONTROLS_DATA {
16786    type Message = MavMessage;
16787    const ID: u32 = 93u32;
16788    const NAME: &'static str = "HIL_ACTUATOR_CONTROLS";
16789    const EXTRA_CRC: u8 = 47u8;
16790    const ENCODED_LEN: usize = 81usize;
16791    fn deser(
16792        _version: MavlinkVersion,
16793        __input: &[u8],
16794    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16795        let avail_len = __input.len();
16796        let mut payload_buf = [0; Self::ENCODED_LEN];
16797        let mut buf = if avail_len < Self::ENCODED_LEN {
16798            payload_buf[0..avail_len].copy_from_slice(__input);
16799            Bytes::new(&payload_buf)
16800        } else {
16801            Bytes::new(__input)
16802        };
16803        let mut __struct = Self::default();
16804        __struct.time_usec = buf.get_u64_le();
16805        let tmp = buf.get_u64_le();
16806        __struct.flags =
16807            HilActuatorControlsFlags::from_bits(tmp & HilActuatorControlsFlags::all().bits())
16808                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
16809                    flag_type: "HilActuatorControlsFlags",
16810                    value: tmp as u32,
16811                })?;
16812        for v in &mut __struct.controls {
16813            let val = buf.get_f32_le();
16814            *v = val;
16815        }
16816        let tmp = buf.get_u8();
16817        __struct.mode = MavModeFlag::from_bits(tmp & MavModeFlag::all().bits()).ok_or(
16818            ::mavlink_core::error::ParserError::InvalidFlag {
16819                flag_type: "MavModeFlag",
16820                value: tmp as u32,
16821            },
16822        )?;
16823        Ok(__struct)
16824    }
16825    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16826        let mut __tmp = BytesMut::new(bytes);
16827        #[allow(clippy::absurd_extreme_comparisons)]
16828        #[allow(unused_comparisons)]
16829        if __tmp.remaining() < Self::ENCODED_LEN {
16830            panic!(
16831                "buffer is too small (need {} bytes, but got {})",
16832                Self::ENCODED_LEN,
16833                __tmp.remaining(),
16834            )
16835        }
16836        __tmp.put_u64_le(self.time_usec);
16837        __tmp.put_u64_le(self.flags.bits());
16838        for val in &self.controls {
16839            __tmp.put_f32_le(*val);
16840        }
16841        __tmp.put_u8(self.mode.bits());
16842        if matches!(version, MavlinkVersion::V2) {
16843            let len = __tmp.len();
16844            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16845        } else {
16846            __tmp.len()
16847        }
16848    }
16849}
16850#[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_ACTUATOR_CONTROLS."]
16851#[doc = ""]
16852#[doc = "ID: 91"]
16853#[derive(Debug, Clone, PartialEq)]
16854#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16855#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16856#[cfg_attr(feature = "ts", derive(TS))]
16857#[cfg_attr(feature = "ts", ts(export))]
16858pub struct HIL_CONTROLS_DATA {
16859    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16860    pub time_usec: u64,
16861    #[doc = "Control output -1 .. 1"]
16862    pub roll_ailerons: f32,
16863    #[doc = "Control output -1 .. 1"]
16864    pub pitch_elevator: f32,
16865    #[doc = "Control output -1 .. 1"]
16866    pub yaw_rudder: f32,
16867    #[doc = "Throttle 0 .. 1"]
16868    pub throttle: f32,
16869    #[doc = "Aux 1, -1 .. 1"]
16870    pub aux1: f32,
16871    #[doc = "Aux 2, -1 .. 1"]
16872    pub aux2: f32,
16873    #[doc = "Aux 3, -1 .. 1"]
16874    pub aux3: f32,
16875    #[doc = "Aux 4, -1 .. 1"]
16876    pub aux4: f32,
16877    #[doc = "System mode."]
16878    pub mode: MavMode,
16879    #[doc = "Navigation mode (MAV_NAV_MODE)"]
16880    pub nav_mode: u8,
16881}
16882impl HIL_CONTROLS_DATA {
16883    pub const ENCODED_LEN: usize = 42usize;
16884    pub const DEFAULT: Self = Self {
16885        time_usec: 0_u64,
16886        roll_ailerons: 0.0_f32,
16887        pitch_elevator: 0.0_f32,
16888        yaw_rudder: 0.0_f32,
16889        throttle: 0.0_f32,
16890        aux1: 0.0_f32,
16891        aux2: 0.0_f32,
16892        aux3: 0.0_f32,
16893        aux4: 0.0_f32,
16894        mode: MavMode::DEFAULT,
16895        nav_mode: 0_u8,
16896    };
16897    #[cfg(feature = "arbitrary")]
16898    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16899        use arbitrary::{Arbitrary, Unstructured};
16900        let mut buf = [0u8; 1024];
16901        rng.fill_bytes(&mut buf);
16902        let mut unstructured = Unstructured::new(&buf);
16903        Self::arbitrary(&mut unstructured).unwrap_or_default()
16904    }
16905}
16906impl Default for HIL_CONTROLS_DATA {
16907    fn default() -> Self {
16908        Self::DEFAULT.clone()
16909    }
16910}
16911impl MessageData for HIL_CONTROLS_DATA {
16912    type Message = MavMessage;
16913    const ID: u32 = 91u32;
16914    const NAME: &'static str = "HIL_CONTROLS";
16915    const EXTRA_CRC: u8 = 63u8;
16916    const ENCODED_LEN: usize = 42usize;
16917    fn deser(
16918        _version: MavlinkVersion,
16919        __input: &[u8],
16920    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16921        let avail_len = __input.len();
16922        let mut payload_buf = [0; Self::ENCODED_LEN];
16923        let mut buf = if avail_len < Self::ENCODED_LEN {
16924            payload_buf[0..avail_len].copy_from_slice(__input);
16925            Bytes::new(&payload_buf)
16926        } else {
16927            Bytes::new(__input)
16928        };
16929        let mut __struct = Self::default();
16930        __struct.time_usec = buf.get_u64_le();
16931        __struct.roll_ailerons = buf.get_f32_le();
16932        __struct.pitch_elevator = buf.get_f32_le();
16933        __struct.yaw_rudder = buf.get_f32_le();
16934        __struct.throttle = buf.get_f32_le();
16935        __struct.aux1 = buf.get_f32_le();
16936        __struct.aux2 = buf.get_f32_le();
16937        __struct.aux3 = buf.get_f32_le();
16938        __struct.aux4 = buf.get_f32_le();
16939        let tmp = buf.get_u8();
16940        __struct.mode =
16941            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16942                enum_type: "MavMode",
16943                value: tmp as u32,
16944            })?;
16945        __struct.nav_mode = buf.get_u8();
16946        Ok(__struct)
16947    }
16948    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16949        let mut __tmp = BytesMut::new(bytes);
16950        #[allow(clippy::absurd_extreme_comparisons)]
16951        #[allow(unused_comparisons)]
16952        if __tmp.remaining() < Self::ENCODED_LEN {
16953            panic!(
16954                "buffer is too small (need {} bytes, but got {})",
16955                Self::ENCODED_LEN,
16956                __tmp.remaining(),
16957            )
16958        }
16959        __tmp.put_u64_le(self.time_usec);
16960        __tmp.put_f32_le(self.roll_ailerons);
16961        __tmp.put_f32_le(self.pitch_elevator);
16962        __tmp.put_f32_le(self.yaw_rudder);
16963        __tmp.put_f32_le(self.throttle);
16964        __tmp.put_f32_le(self.aux1);
16965        __tmp.put_f32_le(self.aux2);
16966        __tmp.put_f32_le(self.aux3);
16967        __tmp.put_f32_le(self.aux4);
16968        __tmp.put_u8(self.mode as u8);
16969        __tmp.put_u8(self.nav_mode);
16970        if matches!(version, MavlinkVersion::V2) {
16971            let len = __tmp.len();
16972            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16973        } else {
16974            __tmp.len()
16975        }
16976    }
16977}
16978#[doc = "The global position, as returned by the Global Positioning System (GPS). This is                  NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
16979#[doc = ""]
16980#[doc = "ID: 113"]
16981#[derive(Debug, Clone, PartialEq)]
16982#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16983#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16984#[cfg_attr(feature = "ts", derive(TS))]
16985#[cfg_attr(feature = "ts", ts(export))]
16986pub struct HIL_GPS_DATA {
16987    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16988    pub time_usec: u64,
16989    #[doc = "Latitude (WGS84)"]
16990    pub lat: i32,
16991    #[doc = "Longitude (WGS84)"]
16992    pub lon: i32,
16993    #[doc = "Altitude (MSL). Positive for up."]
16994    pub alt: i32,
16995    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
16996    pub eph: u16,
16997    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
16998    pub epv: u16,
16999    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
17000    pub vel: u16,
17001    #[doc = "GPS velocity in north direction in earth-fixed NED frame"]
17002    pub vn: i16,
17003    #[doc = "GPS velocity in east direction in earth-fixed NED frame"]
17004    pub ve: i16,
17005    #[doc = "GPS velocity in down direction in earth-fixed NED frame"]
17006    pub vd: i16,
17007    #[doc = "Course over ground (NOT heading, but direction of movement), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
17008    pub cog: u16,
17009    #[doc = "0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix."]
17010    pub fix_type: u8,
17011    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
17012    pub satellites_visible: u8,
17013    #[doc = "GPS ID (zero indexed). Used for multiple GPS inputs"]
17014    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17015    pub id: u8,
17016    #[doc = "Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north"]
17017    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17018    pub yaw: u16,
17019}
17020impl HIL_GPS_DATA {
17021    pub const ENCODED_LEN: usize = 39usize;
17022    pub const DEFAULT: Self = Self {
17023        time_usec: 0_u64,
17024        lat: 0_i32,
17025        lon: 0_i32,
17026        alt: 0_i32,
17027        eph: 0_u16,
17028        epv: 0_u16,
17029        vel: 0_u16,
17030        vn: 0_i16,
17031        ve: 0_i16,
17032        vd: 0_i16,
17033        cog: 0_u16,
17034        fix_type: 0_u8,
17035        satellites_visible: 0_u8,
17036        id: 0_u8,
17037        yaw: 0_u16,
17038    };
17039    #[cfg(feature = "arbitrary")]
17040    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17041        use arbitrary::{Arbitrary, Unstructured};
17042        let mut buf = [0u8; 1024];
17043        rng.fill_bytes(&mut buf);
17044        let mut unstructured = Unstructured::new(&buf);
17045        Self::arbitrary(&mut unstructured).unwrap_or_default()
17046    }
17047}
17048impl Default for HIL_GPS_DATA {
17049    fn default() -> Self {
17050        Self::DEFAULT.clone()
17051    }
17052}
17053impl MessageData for HIL_GPS_DATA {
17054    type Message = MavMessage;
17055    const ID: u32 = 113u32;
17056    const NAME: &'static str = "HIL_GPS";
17057    const EXTRA_CRC: u8 = 124u8;
17058    const ENCODED_LEN: usize = 39usize;
17059    fn deser(
17060        _version: MavlinkVersion,
17061        __input: &[u8],
17062    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17063        let avail_len = __input.len();
17064        let mut payload_buf = [0; Self::ENCODED_LEN];
17065        let mut buf = if avail_len < Self::ENCODED_LEN {
17066            payload_buf[0..avail_len].copy_from_slice(__input);
17067            Bytes::new(&payload_buf)
17068        } else {
17069            Bytes::new(__input)
17070        };
17071        let mut __struct = Self::default();
17072        __struct.time_usec = buf.get_u64_le();
17073        __struct.lat = buf.get_i32_le();
17074        __struct.lon = buf.get_i32_le();
17075        __struct.alt = buf.get_i32_le();
17076        __struct.eph = buf.get_u16_le();
17077        __struct.epv = buf.get_u16_le();
17078        __struct.vel = buf.get_u16_le();
17079        __struct.vn = buf.get_i16_le();
17080        __struct.ve = buf.get_i16_le();
17081        __struct.vd = buf.get_i16_le();
17082        __struct.cog = buf.get_u16_le();
17083        __struct.fix_type = buf.get_u8();
17084        __struct.satellites_visible = buf.get_u8();
17085        __struct.id = buf.get_u8();
17086        __struct.yaw = buf.get_u16_le();
17087        Ok(__struct)
17088    }
17089    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17090        let mut __tmp = BytesMut::new(bytes);
17091        #[allow(clippy::absurd_extreme_comparisons)]
17092        #[allow(unused_comparisons)]
17093        if __tmp.remaining() < Self::ENCODED_LEN {
17094            panic!(
17095                "buffer is too small (need {} bytes, but got {})",
17096                Self::ENCODED_LEN,
17097                __tmp.remaining(),
17098            )
17099        }
17100        __tmp.put_u64_le(self.time_usec);
17101        __tmp.put_i32_le(self.lat);
17102        __tmp.put_i32_le(self.lon);
17103        __tmp.put_i32_le(self.alt);
17104        __tmp.put_u16_le(self.eph);
17105        __tmp.put_u16_le(self.epv);
17106        __tmp.put_u16_le(self.vel);
17107        __tmp.put_i16_le(self.vn);
17108        __tmp.put_i16_le(self.ve);
17109        __tmp.put_i16_le(self.vd);
17110        __tmp.put_u16_le(self.cog);
17111        __tmp.put_u8(self.fix_type);
17112        __tmp.put_u8(self.satellites_visible);
17113        if matches!(version, MavlinkVersion::V2) {
17114            __tmp.put_u8(self.id);
17115            __tmp.put_u16_le(self.yaw);
17116            let len = __tmp.len();
17117            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17118        } else {
17119            __tmp.len()
17120        }
17121    }
17122}
17123#[doc = "Simulated optical flow from a flow sensor (e.g. PX4FLOW or optical mouse sensor)."]
17124#[doc = ""]
17125#[doc = "ID: 114"]
17126#[derive(Debug, Clone, PartialEq)]
17127#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17128#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17129#[cfg_attr(feature = "ts", derive(TS))]
17130#[cfg_attr(feature = "ts", ts(export))]
17131pub struct HIL_OPTICAL_FLOW_DATA {
17132    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17133    pub time_usec: u64,
17134    #[doc = "Integration time. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the."]
17135    pub integration_time_us: u32,
17136    #[doc = "Flow in radians around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.)"]
17137    pub integrated_x: f32,
17138    #[doc = "Flow in radians around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.)"]
17139    pub integrated_y: f32,
17140    #[doc = "RH rotation around X axis"]
17141    pub integrated_xgyro: f32,
17142    #[doc = "RH rotation around Y axis"]
17143    pub integrated_ygyro: f32,
17144    #[doc = "RH rotation around Z axis"]
17145    pub integrated_zgyro: f32,
17146    #[doc = "Time since the distance was sampled."]
17147    pub time_delta_distance_us: u32,
17148    #[doc = "Distance to the center of the flow field. Positive value (including zero): distance known. Negative value: Unknown distance."]
17149    pub distance: f32,
17150    #[doc = "Temperature"]
17151    pub temperature: i16,
17152    #[doc = "Sensor ID"]
17153    pub sensor_id: u8,
17154    #[doc = "Optical flow quality / confidence. 0: no valid flow, 255: maximum quality"]
17155    pub quality: u8,
17156}
17157impl HIL_OPTICAL_FLOW_DATA {
17158    pub const ENCODED_LEN: usize = 44usize;
17159    pub const DEFAULT: Self = Self {
17160        time_usec: 0_u64,
17161        integration_time_us: 0_u32,
17162        integrated_x: 0.0_f32,
17163        integrated_y: 0.0_f32,
17164        integrated_xgyro: 0.0_f32,
17165        integrated_ygyro: 0.0_f32,
17166        integrated_zgyro: 0.0_f32,
17167        time_delta_distance_us: 0_u32,
17168        distance: 0.0_f32,
17169        temperature: 0_i16,
17170        sensor_id: 0_u8,
17171        quality: 0_u8,
17172    };
17173    #[cfg(feature = "arbitrary")]
17174    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17175        use arbitrary::{Arbitrary, Unstructured};
17176        let mut buf = [0u8; 1024];
17177        rng.fill_bytes(&mut buf);
17178        let mut unstructured = Unstructured::new(&buf);
17179        Self::arbitrary(&mut unstructured).unwrap_or_default()
17180    }
17181}
17182impl Default for HIL_OPTICAL_FLOW_DATA {
17183    fn default() -> Self {
17184        Self::DEFAULT.clone()
17185    }
17186}
17187impl MessageData for HIL_OPTICAL_FLOW_DATA {
17188    type Message = MavMessage;
17189    const ID: u32 = 114u32;
17190    const NAME: &'static str = "HIL_OPTICAL_FLOW";
17191    const EXTRA_CRC: u8 = 237u8;
17192    const ENCODED_LEN: usize = 44usize;
17193    fn deser(
17194        _version: MavlinkVersion,
17195        __input: &[u8],
17196    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17197        let avail_len = __input.len();
17198        let mut payload_buf = [0; Self::ENCODED_LEN];
17199        let mut buf = if avail_len < Self::ENCODED_LEN {
17200            payload_buf[0..avail_len].copy_from_slice(__input);
17201            Bytes::new(&payload_buf)
17202        } else {
17203            Bytes::new(__input)
17204        };
17205        let mut __struct = Self::default();
17206        __struct.time_usec = buf.get_u64_le();
17207        __struct.integration_time_us = buf.get_u32_le();
17208        __struct.integrated_x = buf.get_f32_le();
17209        __struct.integrated_y = buf.get_f32_le();
17210        __struct.integrated_xgyro = buf.get_f32_le();
17211        __struct.integrated_ygyro = buf.get_f32_le();
17212        __struct.integrated_zgyro = buf.get_f32_le();
17213        __struct.time_delta_distance_us = buf.get_u32_le();
17214        __struct.distance = buf.get_f32_le();
17215        __struct.temperature = buf.get_i16_le();
17216        __struct.sensor_id = buf.get_u8();
17217        __struct.quality = buf.get_u8();
17218        Ok(__struct)
17219    }
17220    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17221        let mut __tmp = BytesMut::new(bytes);
17222        #[allow(clippy::absurd_extreme_comparisons)]
17223        #[allow(unused_comparisons)]
17224        if __tmp.remaining() < Self::ENCODED_LEN {
17225            panic!(
17226                "buffer is too small (need {} bytes, but got {})",
17227                Self::ENCODED_LEN,
17228                __tmp.remaining(),
17229            )
17230        }
17231        __tmp.put_u64_le(self.time_usec);
17232        __tmp.put_u32_le(self.integration_time_us);
17233        __tmp.put_f32_le(self.integrated_x);
17234        __tmp.put_f32_le(self.integrated_y);
17235        __tmp.put_f32_le(self.integrated_xgyro);
17236        __tmp.put_f32_le(self.integrated_ygyro);
17237        __tmp.put_f32_le(self.integrated_zgyro);
17238        __tmp.put_u32_le(self.time_delta_distance_us);
17239        __tmp.put_f32_le(self.distance);
17240        __tmp.put_i16_le(self.temperature);
17241        __tmp.put_u8(self.sensor_id);
17242        __tmp.put_u8(self.quality);
17243        if matches!(version, MavlinkVersion::V2) {
17244            let len = __tmp.len();
17245            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17246        } else {
17247            __tmp.len()
17248        }
17249    }
17250}
17251#[doc = "Sent from simulation to autopilot. The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification."]
17252#[doc = ""]
17253#[doc = "ID: 92"]
17254#[derive(Debug, Clone, PartialEq)]
17255#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17256#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17257#[cfg_attr(feature = "ts", derive(TS))]
17258#[cfg_attr(feature = "ts", ts(export))]
17259pub struct HIL_RC_INPUTS_RAW_DATA {
17260    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17261    pub time_usec: u64,
17262    #[doc = "RC channel 1 value"]
17263    pub chan1_raw: u16,
17264    #[doc = "RC channel 2 value"]
17265    pub chan2_raw: u16,
17266    #[doc = "RC channel 3 value"]
17267    pub chan3_raw: u16,
17268    #[doc = "RC channel 4 value"]
17269    pub chan4_raw: u16,
17270    #[doc = "RC channel 5 value"]
17271    pub chan5_raw: u16,
17272    #[doc = "RC channel 6 value"]
17273    pub chan6_raw: u16,
17274    #[doc = "RC channel 7 value"]
17275    pub chan7_raw: u16,
17276    #[doc = "RC channel 8 value"]
17277    pub chan8_raw: u16,
17278    #[doc = "RC channel 9 value"]
17279    pub chan9_raw: u16,
17280    #[doc = "RC channel 10 value"]
17281    pub chan10_raw: u16,
17282    #[doc = "RC channel 11 value"]
17283    pub chan11_raw: u16,
17284    #[doc = "RC channel 12 value"]
17285    pub chan12_raw: u16,
17286    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
17287    pub rssi: u8,
17288}
17289impl HIL_RC_INPUTS_RAW_DATA {
17290    pub const ENCODED_LEN: usize = 33usize;
17291    pub const DEFAULT: Self = Self {
17292        time_usec: 0_u64,
17293        chan1_raw: 0_u16,
17294        chan2_raw: 0_u16,
17295        chan3_raw: 0_u16,
17296        chan4_raw: 0_u16,
17297        chan5_raw: 0_u16,
17298        chan6_raw: 0_u16,
17299        chan7_raw: 0_u16,
17300        chan8_raw: 0_u16,
17301        chan9_raw: 0_u16,
17302        chan10_raw: 0_u16,
17303        chan11_raw: 0_u16,
17304        chan12_raw: 0_u16,
17305        rssi: 0_u8,
17306    };
17307    #[cfg(feature = "arbitrary")]
17308    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17309        use arbitrary::{Arbitrary, Unstructured};
17310        let mut buf = [0u8; 1024];
17311        rng.fill_bytes(&mut buf);
17312        let mut unstructured = Unstructured::new(&buf);
17313        Self::arbitrary(&mut unstructured).unwrap_or_default()
17314    }
17315}
17316impl Default for HIL_RC_INPUTS_RAW_DATA {
17317    fn default() -> Self {
17318        Self::DEFAULT.clone()
17319    }
17320}
17321impl MessageData for HIL_RC_INPUTS_RAW_DATA {
17322    type Message = MavMessage;
17323    const ID: u32 = 92u32;
17324    const NAME: &'static str = "HIL_RC_INPUTS_RAW";
17325    const EXTRA_CRC: u8 = 54u8;
17326    const ENCODED_LEN: usize = 33usize;
17327    fn deser(
17328        _version: MavlinkVersion,
17329        __input: &[u8],
17330    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17331        let avail_len = __input.len();
17332        let mut payload_buf = [0; Self::ENCODED_LEN];
17333        let mut buf = if avail_len < Self::ENCODED_LEN {
17334            payload_buf[0..avail_len].copy_from_slice(__input);
17335            Bytes::new(&payload_buf)
17336        } else {
17337            Bytes::new(__input)
17338        };
17339        let mut __struct = Self::default();
17340        __struct.time_usec = buf.get_u64_le();
17341        __struct.chan1_raw = buf.get_u16_le();
17342        __struct.chan2_raw = buf.get_u16_le();
17343        __struct.chan3_raw = buf.get_u16_le();
17344        __struct.chan4_raw = buf.get_u16_le();
17345        __struct.chan5_raw = buf.get_u16_le();
17346        __struct.chan6_raw = buf.get_u16_le();
17347        __struct.chan7_raw = buf.get_u16_le();
17348        __struct.chan8_raw = buf.get_u16_le();
17349        __struct.chan9_raw = buf.get_u16_le();
17350        __struct.chan10_raw = buf.get_u16_le();
17351        __struct.chan11_raw = buf.get_u16_le();
17352        __struct.chan12_raw = buf.get_u16_le();
17353        __struct.rssi = buf.get_u8();
17354        Ok(__struct)
17355    }
17356    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17357        let mut __tmp = BytesMut::new(bytes);
17358        #[allow(clippy::absurd_extreme_comparisons)]
17359        #[allow(unused_comparisons)]
17360        if __tmp.remaining() < Self::ENCODED_LEN {
17361            panic!(
17362                "buffer is too small (need {} bytes, but got {})",
17363                Self::ENCODED_LEN,
17364                __tmp.remaining(),
17365            )
17366        }
17367        __tmp.put_u64_le(self.time_usec);
17368        __tmp.put_u16_le(self.chan1_raw);
17369        __tmp.put_u16_le(self.chan2_raw);
17370        __tmp.put_u16_le(self.chan3_raw);
17371        __tmp.put_u16_le(self.chan4_raw);
17372        __tmp.put_u16_le(self.chan5_raw);
17373        __tmp.put_u16_le(self.chan6_raw);
17374        __tmp.put_u16_le(self.chan7_raw);
17375        __tmp.put_u16_le(self.chan8_raw);
17376        __tmp.put_u16_le(self.chan9_raw);
17377        __tmp.put_u16_le(self.chan10_raw);
17378        __tmp.put_u16_le(self.chan11_raw);
17379        __tmp.put_u16_le(self.chan12_raw);
17380        __tmp.put_u8(self.rssi);
17381        if matches!(version, MavlinkVersion::V2) {
17382            let len = __tmp.len();
17383            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17384        } else {
17385            __tmp.len()
17386        }
17387    }
17388}
17389#[doc = "The IMU readings in SI units in NED body frame."]
17390#[doc = ""]
17391#[doc = "ID: 107"]
17392#[derive(Debug, Clone, PartialEq)]
17393#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17394#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17395#[cfg_attr(feature = "ts", derive(TS))]
17396#[cfg_attr(feature = "ts", ts(export))]
17397pub struct HIL_SENSOR_DATA {
17398    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17399    pub time_usec: u64,
17400    #[doc = "X acceleration"]
17401    pub xacc: f32,
17402    #[doc = "Y acceleration"]
17403    pub yacc: f32,
17404    #[doc = "Z acceleration"]
17405    pub zacc: f32,
17406    #[doc = "Angular speed around X axis in body frame"]
17407    pub xgyro: f32,
17408    #[doc = "Angular speed around Y axis in body frame"]
17409    pub ygyro: f32,
17410    #[doc = "Angular speed around Z axis in body frame"]
17411    pub zgyro: f32,
17412    #[doc = "X Magnetic field"]
17413    pub xmag: f32,
17414    #[doc = "Y Magnetic field"]
17415    pub ymag: f32,
17416    #[doc = "Z Magnetic field"]
17417    pub zmag: f32,
17418    #[doc = "Absolute pressure"]
17419    pub abs_pressure: f32,
17420    #[doc = "Differential pressure (airspeed)"]
17421    pub diff_pressure: f32,
17422    #[doc = "Altitude calculated from pressure"]
17423    pub pressure_alt: f32,
17424    #[doc = "Temperature"]
17425    pub temperature: f32,
17426    #[doc = "Bitmap for fields that have updated since last message"]
17427    pub fields_updated: HilSensorUpdatedFlags,
17428    #[doc = "Sensor ID (zero indexed). Used for multiple sensor inputs"]
17429    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17430    pub id: u8,
17431}
17432impl HIL_SENSOR_DATA {
17433    pub const ENCODED_LEN: usize = 65usize;
17434    pub const DEFAULT: Self = Self {
17435        time_usec: 0_u64,
17436        xacc: 0.0_f32,
17437        yacc: 0.0_f32,
17438        zacc: 0.0_f32,
17439        xgyro: 0.0_f32,
17440        ygyro: 0.0_f32,
17441        zgyro: 0.0_f32,
17442        xmag: 0.0_f32,
17443        ymag: 0.0_f32,
17444        zmag: 0.0_f32,
17445        abs_pressure: 0.0_f32,
17446        diff_pressure: 0.0_f32,
17447        pressure_alt: 0.0_f32,
17448        temperature: 0.0_f32,
17449        fields_updated: HilSensorUpdatedFlags::DEFAULT,
17450        id: 0_u8,
17451    };
17452    #[cfg(feature = "arbitrary")]
17453    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17454        use arbitrary::{Arbitrary, Unstructured};
17455        let mut buf = [0u8; 1024];
17456        rng.fill_bytes(&mut buf);
17457        let mut unstructured = Unstructured::new(&buf);
17458        Self::arbitrary(&mut unstructured).unwrap_or_default()
17459    }
17460}
17461impl Default for HIL_SENSOR_DATA {
17462    fn default() -> Self {
17463        Self::DEFAULT.clone()
17464    }
17465}
17466impl MessageData for HIL_SENSOR_DATA {
17467    type Message = MavMessage;
17468    const ID: u32 = 107u32;
17469    const NAME: &'static str = "HIL_SENSOR";
17470    const EXTRA_CRC: u8 = 108u8;
17471    const ENCODED_LEN: usize = 65usize;
17472    fn deser(
17473        _version: MavlinkVersion,
17474        __input: &[u8],
17475    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17476        let avail_len = __input.len();
17477        let mut payload_buf = [0; Self::ENCODED_LEN];
17478        let mut buf = if avail_len < Self::ENCODED_LEN {
17479            payload_buf[0..avail_len].copy_from_slice(__input);
17480            Bytes::new(&payload_buf)
17481        } else {
17482            Bytes::new(__input)
17483        };
17484        let mut __struct = Self::default();
17485        __struct.time_usec = buf.get_u64_le();
17486        __struct.xacc = buf.get_f32_le();
17487        __struct.yacc = buf.get_f32_le();
17488        __struct.zacc = buf.get_f32_le();
17489        __struct.xgyro = buf.get_f32_le();
17490        __struct.ygyro = buf.get_f32_le();
17491        __struct.zgyro = buf.get_f32_le();
17492        __struct.xmag = buf.get_f32_le();
17493        __struct.ymag = buf.get_f32_le();
17494        __struct.zmag = buf.get_f32_le();
17495        __struct.abs_pressure = buf.get_f32_le();
17496        __struct.diff_pressure = buf.get_f32_le();
17497        __struct.pressure_alt = buf.get_f32_le();
17498        __struct.temperature = buf.get_f32_le();
17499        let tmp = buf.get_u32_le();
17500        __struct.fields_updated = HilSensorUpdatedFlags::from_bits(
17501            tmp & HilSensorUpdatedFlags::all().bits(),
17502        )
17503        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
17504            flag_type: "HilSensorUpdatedFlags",
17505            value: tmp as u32,
17506        })?;
17507        __struct.id = buf.get_u8();
17508        Ok(__struct)
17509    }
17510    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17511        let mut __tmp = BytesMut::new(bytes);
17512        #[allow(clippy::absurd_extreme_comparisons)]
17513        #[allow(unused_comparisons)]
17514        if __tmp.remaining() < Self::ENCODED_LEN {
17515            panic!(
17516                "buffer is too small (need {} bytes, but got {})",
17517                Self::ENCODED_LEN,
17518                __tmp.remaining(),
17519            )
17520        }
17521        __tmp.put_u64_le(self.time_usec);
17522        __tmp.put_f32_le(self.xacc);
17523        __tmp.put_f32_le(self.yacc);
17524        __tmp.put_f32_le(self.zacc);
17525        __tmp.put_f32_le(self.xgyro);
17526        __tmp.put_f32_le(self.ygyro);
17527        __tmp.put_f32_le(self.zgyro);
17528        __tmp.put_f32_le(self.xmag);
17529        __tmp.put_f32_le(self.ymag);
17530        __tmp.put_f32_le(self.zmag);
17531        __tmp.put_f32_le(self.abs_pressure);
17532        __tmp.put_f32_le(self.diff_pressure);
17533        __tmp.put_f32_le(self.pressure_alt);
17534        __tmp.put_f32_le(self.temperature);
17535        __tmp.put_u32_le(self.fields_updated.bits());
17536        if matches!(version, MavlinkVersion::V2) {
17537            __tmp.put_u8(self.id);
17538            let len = __tmp.len();
17539            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17540        } else {
17541            __tmp.len()
17542        }
17543    }
17544}
17545#[deprecated = "Suffers from missing airspeed fields and singularities due to Euler angles. See `HIL_STATE_QUATERNION` (Deprecated since 2013-07)"]
17546#[doc = "Sent from simulation to autopilot. This packet is useful for high throughput applications such as hardware in the loop simulations."]
17547#[doc = ""]
17548#[doc = "ID: 90"]
17549#[derive(Debug, Clone, PartialEq)]
17550#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17551#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17552#[cfg_attr(feature = "ts", derive(TS))]
17553#[cfg_attr(feature = "ts", ts(export))]
17554pub struct HIL_STATE_DATA {
17555    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17556    pub time_usec: u64,
17557    #[doc = "Roll angle"]
17558    pub roll: f32,
17559    #[doc = "Pitch angle"]
17560    pub pitch: f32,
17561    #[doc = "Yaw angle"]
17562    pub yaw: f32,
17563    #[doc = "Body frame roll / phi angular speed"]
17564    pub rollspeed: f32,
17565    #[doc = "Body frame pitch / theta angular speed"]
17566    pub pitchspeed: f32,
17567    #[doc = "Body frame yaw / psi angular speed"]
17568    pub yawspeed: f32,
17569    #[doc = "Latitude"]
17570    pub lat: i32,
17571    #[doc = "Longitude"]
17572    pub lon: i32,
17573    #[doc = "Altitude"]
17574    pub alt: i32,
17575    #[doc = "Ground X Speed (Latitude)"]
17576    pub vx: i16,
17577    #[doc = "Ground Y Speed (Longitude)"]
17578    pub vy: i16,
17579    #[doc = "Ground Z Speed (Altitude)"]
17580    pub vz: i16,
17581    #[doc = "X acceleration"]
17582    pub xacc: i16,
17583    #[doc = "Y acceleration"]
17584    pub yacc: i16,
17585    #[doc = "Z acceleration"]
17586    pub zacc: i16,
17587}
17588impl HIL_STATE_DATA {
17589    pub const ENCODED_LEN: usize = 56usize;
17590    pub const DEFAULT: Self = Self {
17591        time_usec: 0_u64,
17592        roll: 0.0_f32,
17593        pitch: 0.0_f32,
17594        yaw: 0.0_f32,
17595        rollspeed: 0.0_f32,
17596        pitchspeed: 0.0_f32,
17597        yawspeed: 0.0_f32,
17598        lat: 0_i32,
17599        lon: 0_i32,
17600        alt: 0_i32,
17601        vx: 0_i16,
17602        vy: 0_i16,
17603        vz: 0_i16,
17604        xacc: 0_i16,
17605        yacc: 0_i16,
17606        zacc: 0_i16,
17607    };
17608    #[cfg(feature = "arbitrary")]
17609    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17610        use arbitrary::{Arbitrary, Unstructured};
17611        let mut buf = [0u8; 1024];
17612        rng.fill_bytes(&mut buf);
17613        let mut unstructured = Unstructured::new(&buf);
17614        Self::arbitrary(&mut unstructured).unwrap_or_default()
17615    }
17616}
17617impl Default for HIL_STATE_DATA {
17618    fn default() -> Self {
17619        Self::DEFAULT.clone()
17620    }
17621}
17622impl MessageData for HIL_STATE_DATA {
17623    type Message = MavMessage;
17624    const ID: u32 = 90u32;
17625    const NAME: &'static str = "HIL_STATE";
17626    const EXTRA_CRC: u8 = 183u8;
17627    const ENCODED_LEN: usize = 56usize;
17628    fn deser(
17629        _version: MavlinkVersion,
17630        __input: &[u8],
17631    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17632        let avail_len = __input.len();
17633        let mut payload_buf = [0; Self::ENCODED_LEN];
17634        let mut buf = if avail_len < Self::ENCODED_LEN {
17635            payload_buf[0..avail_len].copy_from_slice(__input);
17636            Bytes::new(&payload_buf)
17637        } else {
17638            Bytes::new(__input)
17639        };
17640        let mut __struct = Self::default();
17641        __struct.time_usec = buf.get_u64_le();
17642        __struct.roll = buf.get_f32_le();
17643        __struct.pitch = buf.get_f32_le();
17644        __struct.yaw = buf.get_f32_le();
17645        __struct.rollspeed = buf.get_f32_le();
17646        __struct.pitchspeed = buf.get_f32_le();
17647        __struct.yawspeed = buf.get_f32_le();
17648        __struct.lat = buf.get_i32_le();
17649        __struct.lon = buf.get_i32_le();
17650        __struct.alt = buf.get_i32_le();
17651        __struct.vx = buf.get_i16_le();
17652        __struct.vy = buf.get_i16_le();
17653        __struct.vz = buf.get_i16_le();
17654        __struct.xacc = buf.get_i16_le();
17655        __struct.yacc = buf.get_i16_le();
17656        __struct.zacc = buf.get_i16_le();
17657        Ok(__struct)
17658    }
17659    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17660        let mut __tmp = BytesMut::new(bytes);
17661        #[allow(clippy::absurd_extreme_comparisons)]
17662        #[allow(unused_comparisons)]
17663        if __tmp.remaining() < Self::ENCODED_LEN {
17664            panic!(
17665                "buffer is too small (need {} bytes, but got {})",
17666                Self::ENCODED_LEN,
17667                __tmp.remaining(),
17668            )
17669        }
17670        __tmp.put_u64_le(self.time_usec);
17671        __tmp.put_f32_le(self.roll);
17672        __tmp.put_f32_le(self.pitch);
17673        __tmp.put_f32_le(self.yaw);
17674        __tmp.put_f32_le(self.rollspeed);
17675        __tmp.put_f32_le(self.pitchspeed);
17676        __tmp.put_f32_le(self.yawspeed);
17677        __tmp.put_i32_le(self.lat);
17678        __tmp.put_i32_le(self.lon);
17679        __tmp.put_i32_le(self.alt);
17680        __tmp.put_i16_le(self.vx);
17681        __tmp.put_i16_le(self.vy);
17682        __tmp.put_i16_le(self.vz);
17683        __tmp.put_i16_le(self.xacc);
17684        __tmp.put_i16_le(self.yacc);
17685        __tmp.put_i16_le(self.zacc);
17686        if matches!(version, MavlinkVersion::V2) {
17687            let len = __tmp.len();
17688            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17689        } else {
17690            __tmp.len()
17691        }
17692    }
17693}
17694#[doc = "Sent from simulation to autopilot, avoids in contrast to HIL_STATE singularities. This packet is useful for high throughput applications such as hardware in the loop simulations."]
17695#[doc = ""]
17696#[doc = "ID: 115"]
17697#[derive(Debug, Clone, PartialEq)]
17698#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17699#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17700#[cfg_attr(feature = "ts", derive(TS))]
17701#[cfg_attr(feature = "ts", ts(export))]
17702pub struct HIL_STATE_QUATERNION_DATA {
17703    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17704    pub time_usec: u64,
17705    #[doc = "Vehicle attitude expressed as normalized quaternion in w, x, y, z order (with 1 0 0 0 being the null-rotation)"]
17706    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17707    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17708    pub attitude_quaternion: [f32; 4],
17709    #[doc = "Body frame roll / phi angular speed"]
17710    pub rollspeed: f32,
17711    #[doc = "Body frame pitch / theta angular speed"]
17712    pub pitchspeed: f32,
17713    #[doc = "Body frame yaw / psi angular speed"]
17714    pub yawspeed: f32,
17715    #[doc = "Latitude"]
17716    pub lat: i32,
17717    #[doc = "Longitude"]
17718    pub lon: i32,
17719    #[doc = "Altitude"]
17720    pub alt: i32,
17721    #[doc = "Ground X Speed (Latitude)"]
17722    pub vx: i16,
17723    #[doc = "Ground Y Speed (Longitude)"]
17724    pub vy: i16,
17725    #[doc = "Ground Z Speed (Altitude)"]
17726    pub vz: i16,
17727    #[doc = "Indicated airspeed"]
17728    pub ind_airspeed: u16,
17729    #[doc = "True airspeed"]
17730    pub true_airspeed: u16,
17731    #[doc = "X acceleration"]
17732    pub xacc: i16,
17733    #[doc = "Y acceleration"]
17734    pub yacc: i16,
17735    #[doc = "Z acceleration"]
17736    pub zacc: i16,
17737}
17738impl HIL_STATE_QUATERNION_DATA {
17739    pub const ENCODED_LEN: usize = 64usize;
17740    pub const DEFAULT: Self = Self {
17741        time_usec: 0_u64,
17742        attitude_quaternion: [0.0_f32; 4usize],
17743        rollspeed: 0.0_f32,
17744        pitchspeed: 0.0_f32,
17745        yawspeed: 0.0_f32,
17746        lat: 0_i32,
17747        lon: 0_i32,
17748        alt: 0_i32,
17749        vx: 0_i16,
17750        vy: 0_i16,
17751        vz: 0_i16,
17752        ind_airspeed: 0_u16,
17753        true_airspeed: 0_u16,
17754        xacc: 0_i16,
17755        yacc: 0_i16,
17756        zacc: 0_i16,
17757    };
17758    #[cfg(feature = "arbitrary")]
17759    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17760        use arbitrary::{Arbitrary, Unstructured};
17761        let mut buf = [0u8; 1024];
17762        rng.fill_bytes(&mut buf);
17763        let mut unstructured = Unstructured::new(&buf);
17764        Self::arbitrary(&mut unstructured).unwrap_or_default()
17765    }
17766}
17767impl Default for HIL_STATE_QUATERNION_DATA {
17768    fn default() -> Self {
17769        Self::DEFAULT.clone()
17770    }
17771}
17772impl MessageData for HIL_STATE_QUATERNION_DATA {
17773    type Message = MavMessage;
17774    const ID: u32 = 115u32;
17775    const NAME: &'static str = "HIL_STATE_QUATERNION";
17776    const EXTRA_CRC: u8 = 4u8;
17777    const ENCODED_LEN: usize = 64usize;
17778    fn deser(
17779        _version: MavlinkVersion,
17780        __input: &[u8],
17781    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17782        let avail_len = __input.len();
17783        let mut payload_buf = [0; Self::ENCODED_LEN];
17784        let mut buf = if avail_len < Self::ENCODED_LEN {
17785            payload_buf[0..avail_len].copy_from_slice(__input);
17786            Bytes::new(&payload_buf)
17787        } else {
17788            Bytes::new(__input)
17789        };
17790        let mut __struct = Self::default();
17791        __struct.time_usec = buf.get_u64_le();
17792        for v in &mut __struct.attitude_quaternion {
17793            let val = buf.get_f32_le();
17794            *v = val;
17795        }
17796        __struct.rollspeed = buf.get_f32_le();
17797        __struct.pitchspeed = buf.get_f32_le();
17798        __struct.yawspeed = buf.get_f32_le();
17799        __struct.lat = buf.get_i32_le();
17800        __struct.lon = buf.get_i32_le();
17801        __struct.alt = buf.get_i32_le();
17802        __struct.vx = buf.get_i16_le();
17803        __struct.vy = buf.get_i16_le();
17804        __struct.vz = buf.get_i16_le();
17805        __struct.ind_airspeed = buf.get_u16_le();
17806        __struct.true_airspeed = buf.get_u16_le();
17807        __struct.xacc = buf.get_i16_le();
17808        __struct.yacc = buf.get_i16_le();
17809        __struct.zacc = buf.get_i16_le();
17810        Ok(__struct)
17811    }
17812    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17813        let mut __tmp = BytesMut::new(bytes);
17814        #[allow(clippy::absurd_extreme_comparisons)]
17815        #[allow(unused_comparisons)]
17816        if __tmp.remaining() < Self::ENCODED_LEN {
17817            panic!(
17818                "buffer is too small (need {} bytes, but got {})",
17819                Self::ENCODED_LEN,
17820                __tmp.remaining(),
17821            )
17822        }
17823        __tmp.put_u64_le(self.time_usec);
17824        for val in &self.attitude_quaternion {
17825            __tmp.put_f32_le(*val);
17826        }
17827        __tmp.put_f32_le(self.rollspeed);
17828        __tmp.put_f32_le(self.pitchspeed);
17829        __tmp.put_f32_le(self.yawspeed);
17830        __tmp.put_i32_le(self.lat);
17831        __tmp.put_i32_le(self.lon);
17832        __tmp.put_i32_le(self.alt);
17833        __tmp.put_i16_le(self.vx);
17834        __tmp.put_i16_le(self.vy);
17835        __tmp.put_i16_le(self.vz);
17836        __tmp.put_u16_le(self.ind_airspeed);
17837        __tmp.put_u16_le(self.true_airspeed);
17838        __tmp.put_i16_le(self.xacc);
17839        __tmp.put_i16_le(self.yacc);
17840        __tmp.put_i16_le(self.zacc);
17841        if matches!(version, MavlinkVersion::V2) {
17842            let len = __tmp.len();
17843            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17844        } else {
17845            __tmp.len()
17846        }
17847    }
17848}
17849#[doc = "Contains the home position. \tThe home position is the default position that the system will return to and land on. \tThe position must be set automatically by the system during the takeoff, and may also be explicitly set using MAV_CMD_DO_SET_HOME. \tThe global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface. \tUnder normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach. \tThe approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: this message can be requested by sending the MAV_CMD_REQUEST_MESSAGE with param1=242 (or the deprecated MAV_CMD_GET_HOME_POSITION command)."]
17850#[doc = ""]
17851#[doc = "ID: 242"]
17852#[derive(Debug, Clone, PartialEq)]
17853#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17854#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17855#[cfg_attr(feature = "ts", derive(TS))]
17856#[cfg_attr(feature = "ts", ts(export))]
17857pub struct HOME_POSITION_DATA {
17858    #[doc = "Latitude (WGS84)"]
17859    pub latitude: i32,
17860    #[doc = "Longitude (WGS84)"]
17861    pub longitude: i32,
17862    #[doc = "Altitude (MSL). Positive for up."]
17863    pub altitude: i32,
17864    #[doc = "Local X position of this position in the local coordinate frame (NED)"]
17865    pub x: f32,
17866    #[doc = "Local Y position of this position in the local coordinate frame (NED)"]
17867    pub y: f32,
17868    #[doc = "Local Z position of this position in the local coordinate frame (NED: positive \"down\")"]
17869    pub z: f32,
17870    #[doc = "Quaternion indicating world-to-surface-normal and heading transformation of the takeoff position.         Used to indicate the heading and slope of the ground.         All fields should be set to NaN if an accurate quaternion for both heading and surface slope cannot be supplied."]
17871    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17872    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17873    pub q: [f32; 4],
17874    #[doc = "Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
17875    pub approach_x: f32,
17876    #[doc = "Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
17877    pub approach_y: f32,
17878    #[doc = "Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
17879    pub approach_z: f32,
17880    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17881    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17882    pub time_usec: u64,
17883}
17884impl HOME_POSITION_DATA {
17885    pub const ENCODED_LEN: usize = 60usize;
17886    pub const DEFAULT: Self = Self {
17887        latitude: 0_i32,
17888        longitude: 0_i32,
17889        altitude: 0_i32,
17890        x: 0.0_f32,
17891        y: 0.0_f32,
17892        z: 0.0_f32,
17893        q: [0.0_f32; 4usize],
17894        approach_x: 0.0_f32,
17895        approach_y: 0.0_f32,
17896        approach_z: 0.0_f32,
17897        time_usec: 0_u64,
17898    };
17899    #[cfg(feature = "arbitrary")]
17900    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17901        use arbitrary::{Arbitrary, Unstructured};
17902        let mut buf = [0u8; 1024];
17903        rng.fill_bytes(&mut buf);
17904        let mut unstructured = Unstructured::new(&buf);
17905        Self::arbitrary(&mut unstructured).unwrap_or_default()
17906    }
17907}
17908impl Default for HOME_POSITION_DATA {
17909    fn default() -> Self {
17910        Self::DEFAULT.clone()
17911    }
17912}
17913impl MessageData for HOME_POSITION_DATA {
17914    type Message = MavMessage;
17915    const ID: u32 = 242u32;
17916    const NAME: &'static str = "HOME_POSITION";
17917    const EXTRA_CRC: u8 = 104u8;
17918    const ENCODED_LEN: usize = 60usize;
17919    fn deser(
17920        _version: MavlinkVersion,
17921        __input: &[u8],
17922    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17923        let avail_len = __input.len();
17924        let mut payload_buf = [0; Self::ENCODED_LEN];
17925        let mut buf = if avail_len < Self::ENCODED_LEN {
17926            payload_buf[0..avail_len].copy_from_slice(__input);
17927            Bytes::new(&payload_buf)
17928        } else {
17929            Bytes::new(__input)
17930        };
17931        let mut __struct = Self::default();
17932        __struct.latitude = buf.get_i32_le();
17933        __struct.longitude = buf.get_i32_le();
17934        __struct.altitude = buf.get_i32_le();
17935        __struct.x = buf.get_f32_le();
17936        __struct.y = buf.get_f32_le();
17937        __struct.z = buf.get_f32_le();
17938        for v in &mut __struct.q {
17939            let val = buf.get_f32_le();
17940            *v = val;
17941        }
17942        __struct.approach_x = buf.get_f32_le();
17943        __struct.approach_y = buf.get_f32_le();
17944        __struct.approach_z = buf.get_f32_le();
17945        __struct.time_usec = buf.get_u64_le();
17946        Ok(__struct)
17947    }
17948    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17949        let mut __tmp = BytesMut::new(bytes);
17950        #[allow(clippy::absurd_extreme_comparisons)]
17951        #[allow(unused_comparisons)]
17952        if __tmp.remaining() < Self::ENCODED_LEN {
17953            panic!(
17954                "buffer is too small (need {} bytes, but got {})",
17955                Self::ENCODED_LEN,
17956                __tmp.remaining(),
17957            )
17958        }
17959        __tmp.put_i32_le(self.latitude);
17960        __tmp.put_i32_le(self.longitude);
17961        __tmp.put_i32_le(self.altitude);
17962        __tmp.put_f32_le(self.x);
17963        __tmp.put_f32_le(self.y);
17964        __tmp.put_f32_le(self.z);
17965        for val in &self.q {
17966            __tmp.put_f32_le(*val);
17967        }
17968        __tmp.put_f32_le(self.approach_x);
17969        __tmp.put_f32_le(self.approach_y);
17970        __tmp.put_f32_le(self.approach_z);
17971        if matches!(version, MavlinkVersion::V2) {
17972            __tmp.put_u64_le(self.time_usec);
17973            let len = __tmp.len();
17974            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17975        } else {
17976            __tmp.len()
17977        }
17978    }
17979}
17980#[doc = "Temperature and humidity from hygrometer."]
17981#[doc = ""]
17982#[doc = "ID: 12920"]
17983#[derive(Debug, Clone, PartialEq)]
17984#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17985#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17986#[cfg_attr(feature = "ts", derive(TS))]
17987#[cfg_attr(feature = "ts", ts(export))]
17988pub struct HYGROMETER_SENSOR_DATA {
17989    #[doc = "Temperature"]
17990    pub temperature: i16,
17991    #[doc = "Humidity"]
17992    pub humidity: u16,
17993    #[doc = "Hygrometer ID"]
17994    pub id: u8,
17995}
17996impl HYGROMETER_SENSOR_DATA {
17997    pub const ENCODED_LEN: usize = 5usize;
17998    pub const DEFAULT: Self = Self {
17999        temperature: 0_i16,
18000        humidity: 0_u16,
18001        id: 0_u8,
18002    };
18003    #[cfg(feature = "arbitrary")]
18004    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18005        use arbitrary::{Arbitrary, Unstructured};
18006        let mut buf = [0u8; 1024];
18007        rng.fill_bytes(&mut buf);
18008        let mut unstructured = Unstructured::new(&buf);
18009        Self::arbitrary(&mut unstructured).unwrap_or_default()
18010    }
18011}
18012impl Default for HYGROMETER_SENSOR_DATA {
18013    fn default() -> Self {
18014        Self::DEFAULT.clone()
18015    }
18016}
18017impl MessageData for HYGROMETER_SENSOR_DATA {
18018    type Message = MavMessage;
18019    const ID: u32 = 12920u32;
18020    const NAME: &'static str = "HYGROMETER_SENSOR";
18021    const EXTRA_CRC: u8 = 20u8;
18022    const ENCODED_LEN: usize = 5usize;
18023    fn deser(
18024        _version: MavlinkVersion,
18025        __input: &[u8],
18026    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18027        let avail_len = __input.len();
18028        let mut payload_buf = [0; Self::ENCODED_LEN];
18029        let mut buf = if avail_len < Self::ENCODED_LEN {
18030            payload_buf[0..avail_len].copy_from_slice(__input);
18031            Bytes::new(&payload_buf)
18032        } else {
18033            Bytes::new(__input)
18034        };
18035        let mut __struct = Self::default();
18036        __struct.temperature = buf.get_i16_le();
18037        __struct.humidity = buf.get_u16_le();
18038        __struct.id = buf.get_u8();
18039        Ok(__struct)
18040    }
18041    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18042        let mut __tmp = BytesMut::new(bytes);
18043        #[allow(clippy::absurd_extreme_comparisons)]
18044        #[allow(unused_comparisons)]
18045        if __tmp.remaining() < Self::ENCODED_LEN {
18046            panic!(
18047                "buffer is too small (need {} bytes, but got {})",
18048                Self::ENCODED_LEN,
18049                __tmp.remaining(),
18050            )
18051        }
18052        __tmp.put_i16_le(self.temperature);
18053        __tmp.put_u16_le(self.humidity);
18054        __tmp.put_u8(self.id);
18055        if matches!(version, MavlinkVersion::V2) {
18056            let len = __tmp.len();
18057            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18058        } else {
18059            __tmp.len()
18060        }
18061    }
18062}
18063#[doc = "Illuminator status."]
18064#[doc = ""]
18065#[doc = "ID: 440"]
18066#[derive(Debug, Clone, PartialEq)]
18067#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18068#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18069#[cfg_attr(feature = "ts", derive(TS))]
18070#[cfg_attr(feature = "ts", ts(export))]
18071pub struct ILLUMINATOR_STATUS_DATA {
18072    #[doc = "Time since the start-up of the illuminator in ms"]
18073    pub uptime_ms: u32,
18074    #[doc = "Errors"]
18075    pub error_status: IlluminatorErrorFlags,
18076    #[doc = "Illuminator brightness"]
18077    pub brightness: f32,
18078    #[doc = "Illuminator strobing period in seconds"]
18079    pub strobe_period: f32,
18080    #[doc = "Illuminator strobing duty cycle"]
18081    pub strobe_duty_cycle: f32,
18082    #[doc = "Temperature in Celsius"]
18083    pub temp_c: f32,
18084    #[doc = "Minimum strobing period in seconds"]
18085    pub min_strobe_period: f32,
18086    #[doc = "Maximum strobing period in seconds"]
18087    pub max_strobe_period: f32,
18088    #[doc = "0: Illuminators OFF, 1: Illuminators ON"]
18089    pub enable: u8,
18090    #[doc = "Supported illuminator modes"]
18091    pub mode_bitmask: IlluminatorMode,
18092    #[doc = "Illuminator mode"]
18093    pub mode: IlluminatorMode,
18094}
18095impl ILLUMINATOR_STATUS_DATA {
18096    pub const ENCODED_LEN: usize = 35usize;
18097    pub const DEFAULT: Self = Self {
18098        uptime_ms: 0_u32,
18099        error_status: IlluminatorErrorFlags::DEFAULT,
18100        brightness: 0.0_f32,
18101        strobe_period: 0.0_f32,
18102        strobe_duty_cycle: 0.0_f32,
18103        temp_c: 0.0_f32,
18104        min_strobe_period: 0.0_f32,
18105        max_strobe_period: 0.0_f32,
18106        enable: 0_u8,
18107        mode_bitmask: IlluminatorMode::DEFAULT,
18108        mode: IlluminatorMode::DEFAULT,
18109    };
18110    #[cfg(feature = "arbitrary")]
18111    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18112        use arbitrary::{Arbitrary, Unstructured};
18113        let mut buf = [0u8; 1024];
18114        rng.fill_bytes(&mut buf);
18115        let mut unstructured = Unstructured::new(&buf);
18116        Self::arbitrary(&mut unstructured).unwrap_or_default()
18117    }
18118}
18119impl Default for ILLUMINATOR_STATUS_DATA {
18120    fn default() -> Self {
18121        Self::DEFAULT.clone()
18122    }
18123}
18124impl MessageData for ILLUMINATOR_STATUS_DATA {
18125    type Message = MavMessage;
18126    const ID: u32 = 440u32;
18127    const NAME: &'static str = "ILLUMINATOR_STATUS";
18128    const EXTRA_CRC: u8 = 66u8;
18129    const ENCODED_LEN: usize = 35usize;
18130    fn deser(
18131        _version: MavlinkVersion,
18132        __input: &[u8],
18133    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18134        let avail_len = __input.len();
18135        let mut payload_buf = [0; Self::ENCODED_LEN];
18136        let mut buf = if avail_len < Self::ENCODED_LEN {
18137            payload_buf[0..avail_len].copy_from_slice(__input);
18138            Bytes::new(&payload_buf)
18139        } else {
18140            Bytes::new(__input)
18141        };
18142        let mut __struct = Self::default();
18143        __struct.uptime_ms = buf.get_u32_le();
18144        let tmp = buf.get_u32_le();
18145        __struct.error_status = IlluminatorErrorFlags::from_bits(
18146            tmp & IlluminatorErrorFlags::all().bits(),
18147        )
18148        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
18149            flag_type: "IlluminatorErrorFlags",
18150            value: tmp as u32,
18151        })?;
18152        __struct.brightness = buf.get_f32_le();
18153        __struct.strobe_period = buf.get_f32_le();
18154        __struct.strobe_duty_cycle = buf.get_f32_le();
18155        __struct.temp_c = buf.get_f32_le();
18156        __struct.min_strobe_period = buf.get_f32_le();
18157        __struct.max_strobe_period = buf.get_f32_le();
18158        __struct.enable = buf.get_u8();
18159        let tmp = buf.get_u8();
18160        __struct.mode_bitmask =
18161            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18162                enum_type: "IlluminatorMode",
18163                value: tmp as u32,
18164            })?;
18165        let tmp = buf.get_u8();
18166        __struct.mode =
18167            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18168                enum_type: "IlluminatorMode",
18169                value: tmp as u32,
18170            })?;
18171        Ok(__struct)
18172    }
18173    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18174        let mut __tmp = BytesMut::new(bytes);
18175        #[allow(clippy::absurd_extreme_comparisons)]
18176        #[allow(unused_comparisons)]
18177        if __tmp.remaining() < Self::ENCODED_LEN {
18178            panic!(
18179                "buffer is too small (need {} bytes, but got {})",
18180                Self::ENCODED_LEN,
18181                __tmp.remaining(),
18182            )
18183        }
18184        __tmp.put_u32_le(self.uptime_ms);
18185        __tmp.put_u32_le(self.error_status.bits());
18186        __tmp.put_f32_le(self.brightness);
18187        __tmp.put_f32_le(self.strobe_period);
18188        __tmp.put_f32_le(self.strobe_duty_cycle);
18189        __tmp.put_f32_le(self.temp_c);
18190        __tmp.put_f32_le(self.min_strobe_period);
18191        __tmp.put_f32_le(self.max_strobe_period);
18192        __tmp.put_u8(self.enable);
18193        __tmp.put_u8(self.mode_bitmask as u8);
18194        __tmp.put_u8(self.mode as u8);
18195        if matches!(version, MavlinkVersion::V2) {
18196            let len = __tmp.len();
18197            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18198        } else {
18199            __tmp.len()
18200        }
18201    }
18202}
18203#[doc = "Status of the Iridium SBD link."]
18204#[doc = ""]
18205#[doc = "ID: 335"]
18206#[derive(Debug, Clone, PartialEq)]
18207#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18208#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18209#[cfg_attr(feature = "ts", derive(TS))]
18210#[cfg_attr(feature = "ts", ts(export))]
18211pub struct ISBD_LINK_STATUS_DATA {
18212    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
18213    pub timestamp: u64,
18214    #[doc = "Timestamp of the last successful sbd session. The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
18215    pub last_heartbeat: u64,
18216    #[doc = "Number of failed SBD sessions."]
18217    pub failed_sessions: u16,
18218    #[doc = "Number of successful SBD sessions."]
18219    pub successful_sessions: u16,
18220    #[doc = "Signal quality equal to the number of bars displayed on the ISU signal strength indicator. Range is 0 to 5, where 0 indicates no signal and 5 indicates maximum signal strength."]
18221    pub signal_quality: u8,
18222    #[doc = "1: Ring call pending, 0: No call pending."]
18223    pub ring_pending: u8,
18224    #[doc = "1: Transmission session pending, 0: No transmission session pending."]
18225    pub tx_session_pending: u8,
18226    #[doc = "1: Receiving session pending, 0: No receiving session pending."]
18227    pub rx_session_pending: u8,
18228}
18229impl ISBD_LINK_STATUS_DATA {
18230    pub const ENCODED_LEN: usize = 24usize;
18231    pub const DEFAULT: Self = Self {
18232        timestamp: 0_u64,
18233        last_heartbeat: 0_u64,
18234        failed_sessions: 0_u16,
18235        successful_sessions: 0_u16,
18236        signal_quality: 0_u8,
18237        ring_pending: 0_u8,
18238        tx_session_pending: 0_u8,
18239        rx_session_pending: 0_u8,
18240    };
18241    #[cfg(feature = "arbitrary")]
18242    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18243        use arbitrary::{Arbitrary, Unstructured};
18244        let mut buf = [0u8; 1024];
18245        rng.fill_bytes(&mut buf);
18246        let mut unstructured = Unstructured::new(&buf);
18247        Self::arbitrary(&mut unstructured).unwrap_or_default()
18248    }
18249}
18250impl Default for ISBD_LINK_STATUS_DATA {
18251    fn default() -> Self {
18252        Self::DEFAULT.clone()
18253    }
18254}
18255impl MessageData for ISBD_LINK_STATUS_DATA {
18256    type Message = MavMessage;
18257    const ID: u32 = 335u32;
18258    const NAME: &'static str = "ISBD_LINK_STATUS";
18259    const EXTRA_CRC: u8 = 225u8;
18260    const ENCODED_LEN: usize = 24usize;
18261    fn deser(
18262        _version: MavlinkVersion,
18263        __input: &[u8],
18264    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18265        let avail_len = __input.len();
18266        let mut payload_buf = [0; Self::ENCODED_LEN];
18267        let mut buf = if avail_len < Self::ENCODED_LEN {
18268            payload_buf[0..avail_len].copy_from_slice(__input);
18269            Bytes::new(&payload_buf)
18270        } else {
18271            Bytes::new(__input)
18272        };
18273        let mut __struct = Self::default();
18274        __struct.timestamp = buf.get_u64_le();
18275        __struct.last_heartbeat = buf.get_u64_le();
18276        __struct.failed_sessions = buf.get_u16_le();
18277        __struct.successful_sessions = buf.get_u16_le();
18278        __struct.signal_quality = buf.get_u8();
18279        __struct.ring_pending = buf.get_u8();
18280        __struct.tx_session_pending = buf.get_u8();
18281        __struct.rx_session_pending = buf.get_u8();
18282        Ok(__struct)
18283    }
18284    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18285        let mut __tmp = BytesMut::new(bytes);
18286        #[allow(clippy::absurd_extreme_comparisons)]
18287        #[allow(unused_comparisons)]
18288        if __tmp.remaining() < Self::ENCODED_LEN {
18289            panic!(
18290                "buffer is too small (need {} bytes, but got {})",
18291                Self::ENCODED_LEN,
18292                __tmp.remaining(),
18293            )
18294        }
18295        __tmp.put_u64_le(self.timestamp);
18296        __tmp.put_u64_le(self.last_heartbeat);
18297        __tmp.put_u16_le(self.failed_sessions);
18298        __tmp.put_u16_le(self.successful_sessions);
18299        __tmp.put_u8(self.signal_quality);
18300        __tmp.put_u8(self.ring_pending);
18301        __tmp.put_u8(self.tx_session_pending);
18302        __tmp.put_u8(self.rx_session_pending);
18303        if matches!(version, MavlinkVersion::V2) {
18304            let len = __tmp.len();
18305            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18306        } else {
18307            __tmp.len()
18308        }
18309    }
18310}
18311#[doc = "The location of a landing target. See: <https://mavlink.io/en/services/landing_target.html>."]
18312#[doc = ""]
18313#[doc = "ID: 149"]
18314#[derive(Debug, Clone, PartialEq)]
18315#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18316#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18317#[cfg_attr(feature = "ts", derive(TS))]
18318#[cfg_attr(feature = "ts", ts(export))]
18319pub struct LANDING_TARGET_DATA {
18320    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
18321    pub time_usec: u64,
18322    #[doc = "X-axis angular offset of the target from the center of the image"]
18323    pub angle_x: f32,
18324    #[doc = "Y-axis angular offset of the target from the center of the image"]
18325    pub angle_y: f32,
18326    #[doc = "Distance to the target from the vehicle"]
18327    pub distance: f32,
18328    #[doc = "Size of target along x-axis"]
18329    pub size_x: f32,
18330    #[doc = "Size of target along y-axis"]
18331    pub size_y: f32,
18332    #[doc = "The ID of the target if multiple targets are present"]
18333    pub target_num: u8,
18334    #[doc = "Coordinate frame used for following fields."]
18335    pub frame: MavFrame,
18336    #[doc = "X Position of the landing target in MAV_FRAME"]
18337    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18338    pub x: f32,
18339    #[doc = "Y Position of the landing target in MAV_FRAME"]
18340    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18341    pub y: f32,
18342    #[doc = "Z Position of the landing target in MAV_FRAME"]
18343    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18344    pub z: f32,
18345    #[doc = "Quaternion of landing target orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
18346    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18347    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18348    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
18349    pub q: [f32; 4],
18350    #[doc = "Type of landing target"]
18351    #[cfg_attr(feature = "serde", serde(default))]
18352    pub mavtype: LandingTargetType,
18353    #[doc = "Boolean indicating whether the position fields (x, y, z, q, type) contain valid target position information (valid: 1, invalid: 0). Default is 0 (invalid)."]
18354    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18355    pub position_valid: u8,
18356}
18357impl LANDING_TARGET_DATA {
18358    pub const ENCODED_LEN: usize = 60usize;
18359    pub const DEFAULT: Self = Self {
18360        time_usec: 0_u64,
18361        angle_x: 0.0_f32,
18362        angle_y: 0.0_f32,
18363        distance: 0.0_f32,
18364        size_x: 0.0_f32,
18365        size_y: 0.0_f32,
18366        target_num: 0_u8,
18367        frame: MavFrame::DEFAULT,
18368        x: 0.0_f32,
18369        y: 0.0_f32,
18370        z: 0.0_f32,
18371        q: [0.0_f32; 4usize],
18372        mavtype: LandingTargetType::DEFAULT,
18373        position_valid: 0_u8,
18374    };
18375    #[cfg(feature = "arbitrary")]
18376    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18377        use arbitrary::{Arbitrary, Unstructured};
18378        let mut buf = [0u8; 1024];
18379        rng.fill_bytes(&mut buf);
18380        let mut unstructured = Unstructured::new(&buf);
18381        Self::arbitrary(&mut unstructured).unwrap_or_default()
18382    }
18383}
18384impl Default for LANDING_TARGET_DATA {
18385    fn default() -> Self {
18386        Self::DEFAULT.clone()
18387    }
18388}
18389impl MessageData for LANDING_TARGET_DATA {
18390    type Message = MavMessage;
18391    const ID: u32 = 149u32;
18392    const NAME: &'static str = "LANDING_TARGET";
18393    const EXTRA_CRC: u8 = 200u8;
18394    const ENCODED_LEN: usize = 60usize;
18395    fn deser(
18396        _version: MavlinkVersion,
18397        __input: &[u8],
18398    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18399        let avail_len = __input.len();
18400        let mut payload_buf = [0; Self::ENCODED_LEN];
18401        let mut buf = if avail_len < Self::ENCODED_LEN {
18402            payload_buf[0..avail_len].copy_from_slice(__input);
18403            Bytes::new(&payload_buf)
18404        } else {
18405            Bytes::new(__input)
18406        };
18407        let mut __struct = Self::default();
18408        __struct.time_usec = buf.get_u64_le();
18409        __struct.angle_x = buf.get_f32_le();
18410        __struct.angle_y = buf.get_f32_le();
18411        __struct.distance = buf.get_f32_le();
18412        __struct.size_x = buf.get_f32_le();
18413        __struct.size_y = buf.get_f32_le();
18414        __struct.target_num = buf.get_u8();
18415        let tmp = buf.get_u8();
18416        __struct.frame =
18417            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18418                enum_type: "MavFrame",
18419                value: tmp as u32,
18420            })?;
18421        __struct.x = buf.get_f32_le();
18422        __struct.y = buf.get_f32_le();
18423        __struct.z = buf.get_f32_le();
18424        for v in &mut __struct.q {
18425            let val = buf.get_f32_le();
18426            *v = val;
18427        }
18428        let tmp = buf.get_u8();
18429        __struct.mavtype =
18430            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18431                enum_type: "LandingTargetType",
18432                value: tmp as u32,
18433            })?;
18434        __struct.position_valid = buf.get_u8();
18435        Ok(__struct)
18436    }
18437    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18438        let mut __tmp = BytesMut::new(bytes);
18439        #[allow(clippy::absurd_extreme_comparisons)]
18440        #[allow(unused_comparisons)]
18441        if __tmp.remaining() < Self::ENCODED_LEN {
18442            panic!(
18443                "buffer is too small (need {} bytes, but got {})",
18444                Self::ENCODED_LEN,
18445                __tmp.remaining(),
18446            )
18447        }
18448        __tmp.put_u64_le(self.time_usec);
18449        __tmp.put_f32_le(self.angle_x);
18450        __tmp.put_f32_le(self.angle_y);
18451        __tmp.put_f32_le(self.distance);
18452        __tmp.put_f32_le(self.size_x);
18453        __tmp.put_f32_le(self.size_y);
18454        __tmp.put_u8(self.target_num);
18455        __tmp.put_u8(self.frame as u8);
18456        if matches!(version, MavlinkVersion::V2) {
18457            __tmp.put_f32_le(self.x);
18458            __tmp.put_f32_le(self.y);
18459            __tmp.put_f32_le(self.z);
18460            for val in &self.q {
18461                __tmp.put_f32_le(*val);
18462            }
18463            __tmp.put_u8(self.mavtype as u8);
18464            __tmp.put_u8(self.position_valid);
18465            let len = __tmp.len();
18466            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18467        } else {
18468            __tmp.len()
18469        }
18470    }
18471}
18472#[doc = "Status generated in each node in the communication chain and injected into MAVLink stream."]
18473#[doc = ""]
18474#[doc = "ID: 8"]
18475#[derive(Debug, Clone, PartialEq)]
18476#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18477#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18478#[cfg_attr(feature = "ts", derive(TS))]
18479#[cfg_attr(feature = "ts", ts(export))]
18480pub struct LINK_NODE_STATUS_DATA {
18481    #[doc = "Timestamp (time since system boot)."]
18482    pub timestamp: u64,
18483    #[doc = "Transmit rate"]
18484    pub tx_rate: u32,
18485    #[doc = "Receive rate"]
18486    pub rx_rate: u32,
18487    #[doc = "Messages sent"]
18488    pub messages_sent: u32,
18489    #[doc = "Messages received (estimated from counting seq)"]
18490    pub messages_received: u32,
18491    #[doc = "Messages lost (estimated from counting seq)"]
18492    pub messages_lost: u32,
18493    #[doc = "Number of bytes that could not be parsed correctly."]
18494    pub rx_parse_err: u16,
18495    #[doc = "Transmit buffer overflows. This number wraps around as it reaches UINT16_MAX"]
18496    pub tx_overflows: u16,
18497    #[doc = "Receive buffer overflows. This number wraps around as it reaches UINT16_MAX"]
18498    pub rx_overflows: u16,
18499    #[doc = "Remaining free transmit buffer space"]
18500    pub tx_buf: u8,
18501    #[doc = "Remaining free receive buffer space"]
18502    pub rx_buf: u8,
18503}
18504impl LINK_NODE_STATUS_DATA {
18505    pub const ENCODED_LEN: usize = 36usize;
18506    pub const DEFAULT: Self = Self {
18507        timestamp: 0_u64,
18508        tx_rate: 0_u32,
18509        rx_rate: 0_u32,
18510        messages_sent: 0_u32,
18511        messages_received: 0_u32,
18512        messages_lost: 0_u32,
18513        rx_parse_err: 0_u16,
18514        tx_overflows: 0_u16,
18515        rx_overflows: 0_u16,
18516        tx_buf: 0_u8,
18517        rx_buf: 0_u8,
18518    };
18519    #[cfg(feature = "arbitrary")]
18520    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18521        use arbitrary::{Arbitrary, Unstructured};
18522        let mut buf = [0u8; 1024];
18523        rng.fill_bytes(&mut buf);
18524        let mut unstructured = Unstructured::new(&buf);
18525        Self::arbitrary(&mut unstructured).unwrap_or_default()
18526    }
18527}
18528impl Default for LINK_NODE_STATUS_DATA {
18529    fn default() -> Self {
18530        Self::DEFAULT.clone()
18531    }
18532}
18533impl MessageData for LINK_NODE_STATUS_DATA {
18534    type Message = MavMessage;
18535    const ID: u32 = 8u32;
18536    const NAME: &'static str = "LINK_NODE_STATUS";
18537    const EXTRA_CRC: u8 = 117u8;
18538    const ENCODED_LEN: usize = 36usize;
18539    fn deser(
18540        _version: MavlinkVersion,
18541        __input: &[u8],
18542    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18543        let avail_len = __input.len();
18544        let mut payload_buf = [0; Self::ENCODED_LEN];
18545        let mut buf = if avail_len < Self::ENCODED_LEN {
18546            payload_buf[0..avail_len].copy_from_slice(__input);
18547            Bytes::new(&payload_buf)
18548        } else {
18549            Bytes::new(__input)
18550        };
18551        let mut __struct = Self::default();
18552        __struct.timestamp = buf.get_u64_le();
18553        __struct.tx_rate = buf.get_u32_le();
18554        __struct.rx_rate = buf.get_u32_le();
18555        __struct.messages_sent = buf.get_u32_le();
18556        __struct.messages_received = buf.get_u32_le();
18557        __struct.messages_lost = buf.get_u32_le();
18558        __struct.rx_parse_err = buf.get_u16_le();
18559        __struct.tx_overflows = buf.get_u16_le();
18560        __struct.rx_overflows = buf.get_u16_le();
18561        __struct.tx_buf = buf.get_u8();
18562        __struct.rx_buf = buf.get_u8();
18563        Ok(__struct)
18564    }
18565    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18566        let mut __tmp = BytesMut::new(bytes);
18567        #[allow(clippy::absurd_extreme_comparisons)]
18568        #[allow(unused_comparisons)]
18569        if __tmp.remaining() < Self::ENCODED_LEN {
18570            panic!(
18571                "buffer is too small (need {} bytes, but got {})",
18572                Self::ENCODED_LEN,
18573                __tmp.remaining(),
18574            )
18575        }
18576        __tmp.put_u64_le(self.timestamp);
18577        __tmp.put_u32_le(self.tx_rate);
18578        __tmp.put_u32_le(self.rx_rate);
18579        __tmp.put_u32_le(self.messages_sent);
18580        __tmp.put_u32_le(self.messages_received);
18581        __tmp.put_u32_le(self.messages_lost);
18582        __tmp.put_u16_le(self.rx_parse_err);
18583        __tmp.put_u16_le(self.tx_overflows);
18584        __tmp.put_u16_le(self.rx_overflows);
18585        __tmp.put_u8(self.tx_buf);
18586        __tmp.put_u8(self.rx_buf);
18587        if matches!(version, MavlinkVersion::V2) {
18588            let len = __tmp.len();
18589            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18590        } else {
18591            __tmp.len()
18592        }
18593    }
18594}
18595#[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
18596#[doc = ""]
18597#[doc = "ID: 32"]
18598#[derive(Debug, Clone, PartialEq)]
18599#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18600#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18601#[cfg_attr(feature = "ts", derive(TS))]
18602#[cfg_attr(feature = "ts", ts(export))]
18603pub struct LOCAL_POSITION_NED_DATA {
18604    #[doc = "Timestamp (time since system boot)."]
18605    pub time_boot_ms: u32,
18606    #[doc = "X Position"]
18607    pub x: f32,
18608    #[doc = "Y Position"]
18609    pub y: f32,
18610    #[doc = "Z Position"]
18611    pub z: f32,
18612    #[doc = "X Speed"]
18613    pub vx: f32,
18614    #[doc = "Y Speed"]
18615    pub vy: f32,
18616    #[doc = "Z Speed"]
18617    pub vz: f32,
18618}
18619impl LOCAL_POSITION_NED_DATA {
18620    pub const ENCODED_LEN: usize = 28usize;
18621    pub const DEFAULT: Self = Self {
18622        time_boot_ms: 0_u32,
18623        x: 0.0_f32,
18624        y: 0.0_f32,
18625        z: 0.0_f32,
18626        vx: 0.0_f32,
18627        vy: 0.0_f32,
18628        vz: 0.0_f32,
18629    };
18630    #[cfg(feature = "arbitrary")]
18631    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18632        use arbitrary::{Arbitrary, Unstructured};
18633        let mut buf = [0u8; 1024];
18634        rng.fill_bytes(&mut buf);
18635        let mut unstructured = Unstructured::new(&buf);
18636        Self::arbitrary(&mut unstructured).unwrap_or_default()
18637    }
18638}
18639impl Default for LOCAL_POSITION_NED_DATA {
18640    fn default() -> Self {
18641        Self::DEFAULT.clone()
18642    }
18643}
18644impl MessageData for LOCAL_POSITION_NED_DATA {
18645    type Message = MavMessage;
18646    const ID: u32 = 32u32;
18647    const NAME: &'static str = "LOCAL_POSITION_NED";
18648    const EXTRA_CRC: u8 = 185u8;
18649    const ENCODED_LEN: usize = 28usize;
18650    fn deser(
18651        _version: MavlinkVersion,
18652        __input: &[u8],
18653    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18654        let avail_len = __input.len();
18655        let mut payload_buf = [0; Self::ENCODED_LEN];
18656        let mut buf = if avail_len < Self::ENCODED_LEN {
18657            payload_buf[0..avail_len].copy_from_slice(__input);
18658            Bytes::new(&payload_buf)
18659        } else {
18660            Bytes::new(__input)
18661        };
18662        let mut __struct = Self::default();
18663        __struct.time_boot_ms = buf.get_u32_le();
18664        __struct.x = buf.get_f32_le();
18665        __struct.y = buf.get_f32_le();
18666        __struct.z = buf.get_f32_le();
18667        __struct.vx = buf.get_f32_le();
18668        __struct.vy = buf.get_f32_le();
18669        __struct.vz = buf.get_f32_le();
18670        Ok(__struct)
18671    }
18672    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18673        let mut __tmp = BytesMut::new(bytes);
18674        #[allow(clippy::absurd_extreme_comparisons)]
18675        #[allow(unused_comparisons)]
18676        if __tmp.remaining() < Self::ENCODED_LEN {
18677            panic!(
18678                "buffer is too small (need {} bytes, but got {})",
18679                Self::ENCODED_LEN,
18680                __tmp.remaining(),
18681            )
18682        }
18683        __tmp.put_u32_le(self.time_boot_ms);
18684        __tmp.put_f32_le(self.x);
18685        __tmp.put_f32_le(self.y);
18686        __tmp.put_f32_le(self.z);
18687        __tmp.put_f32_le(self.vx);
18688        __tmp.put_f32_le(self.vy);
18689        __tmp.put_f32_le(self.vz);
18690        if matches!(version, MavlinkVersion::V2) {
18691            let len = __tmp.len();
18692            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18693        } else {
18694            __tmp.len()
18695        }
18696    }
18697}
18698#[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
18699#[doc = ""]
18700#[doc = "ID: 64"]
18701#[derive(Debug, Clone, PartialEq)]
18702#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18703#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18704#[cfg_attr(feature = "ts", derive(TS))]
18705#[cfg_attr(feature = "ts", ts(export))]
18706pub struct LOCAL_POSITION_NED_COV_DATA {
18707    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
18708    pub time_usec: u64,
18709    #[doc = "X Position"]
18710    pub x: f32,
18711    #[doc = "Y Position"]
18712    pub y: f32,
18713    #[doc = "Z Position"]
18714    pub z: f32,
18715    #[doc = "X Speed"]
18716    pub vx: f32,
18717    #[doc = "Y Speed"]
18718    pub vy: f32,
18719    #[doc = "Z Speed"]
18720    pub vz: f32,
18721    #[doc = "X Acceleration"]
18722    pub ax: f32,
18723    #[doc = "Y Acceleration"]
18724    pub ay: f32,
18725    #[doc = "Z Acceleration"]
18726    pub az: f32,
18727    #[doc = "Row-major representation of position, velocity and acceleration 9x9 cross-covariance matrix upper right triangle (states: x, y, z, vx, vy, vz, ax, ay, az; first nine entries are the first ROW, next eight entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
18728    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18729    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
18730    pub covariance: [f32; 45],
18731    #[doc = "Class id of the estimator this estimate originated from."]
18732    pub estimator_type: MavEstimatorType,
18733}
18734impl LOCAL_POSITION_NED_COV_DATA {
18735    pub const ENCODED_LEN: usize = 225usize;
18736    pub const DEFAULT: Self = Self {
18737        time_usec: 0_u64,
18738        x: 0.0_f32,
18739        y: 0.0_f32,
18740        z: 0.0_f32,
18741        vx: 0.0_f32,
18742        vy: 0.0_f32,
18743        vz: 0.0_f32,
18744        ax: 0.0_f32,
18745        ay: 0.0_f32,
18746        az: 0.0_f32,
18747        covariance: [0.0_f32; 45usize],
18748        estimator_type: MavEstimatorType::DEFAULT,
18749    };
18750    #[cfg(feature = "arbitrary")]
18751    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18752        use arbitrary::{Arbitrary, Unstructured};
18753        let mut buf = [0u8; 1024];
18754        rng.fill_bytes(&mut buf);
18755        let mut unstructured = Unstructured::new(&buf);
18756        Self::arbitrary(&mut unstructured).unwrap_or_default()
18757    }
18758}
18759impl Default for LOCAL_POSITION_NED_COV_DATA {
18760    fn default() -> Self {
18761        Self::DEFAULT.clone()
18762    }
18763}
18764impl MessageData for LOCAL_POSITION_NED_COV_DATA {
18765    type Message = MavMessage;
18766    const ID: u32 = 64u32;
18767    const NAME: &'static str = "LOCAL_POSITION_NED_COV";
18768    const EXTRA_CRC: u8 = 191u8;
18769    const ENCODED_LEN: usize = 225usize;
18770    fn deser(
18771        _version: MavlinkVersion,
18772        __input: &[u8],
18773    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18774        let avail_len = __input.len();
18775        let mut payload_buf = [0; Self::ENCODED_LEN];
18776        let mut buf = if avail_len < Self::ENCODED_LEN {
18777            payload_buf[0..avail_len].copy_from_slice(__input);
18778            Bytes::new(&payload_buf)
18779        } else {
18780            Bytes::new(__input)
18781        };
18782        let mut __struct = Self::default();
18783        __struct.time_usec = buf.get_u64_le();
18784        __struct.x = buf.get_f32_le();
18785        __struct.y = buf.get_f32_le();
18786        __struct.z = buf.get_f32_le();
18787        __struct.vx = buf.get_f32_le();
18788        __struct.vy = buf.get_f32_le();
18789        __struct.vz = buf.get_f32_le();
18790        __struct.ax = buf.get_f32_le();
18791        __struct.ay = buf.get_f32_le();
18792        __struct.az = buf.get_f32_le();
18793        for v in &mut __struct.covariance {
18794            let val = buf.get_f32_le();
18795            *v = val;
18796        }
18797        let tmp = buf.get_u8();
18798        __struct.estimator_type =
18799            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18800                enum_type: "MavEstimatorType",
18801                value: tmp as u32,
18802            })?;
18803        Ok(__struct)
18804    }
18805    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18806        let mut __tmp = BytesMut::new(bytes);
18807        #[allow(clippy::absurd_extreme_comparisons)]
18808        #[allow(unused_comparisons)]
18809        if __tmp.remaining() < Self::ENCODED_LEN {
18810            panic!(
18811                "buffer is too small (need {} bytes, but got {})",
18812                Self::ENCODED_LEN,
18813                __tmp.remaining(),
18814            )
18815        }
18816        __tmp.put_u64_le(self.time_usec);
18817        __tmp.put_f32_le(self.x);
18818        __tmp.put_f32_le(self.y);
18819        __tmp.put_f32_le(self.z);
18820        __tmp.put_f32_le(self.vx);
18821        __tmp.put_f32_le(self.vy);
18822        __tmp.put_f32_le(self.vz);
18823        __tmp.put_f32_le(self.ax);
18824        __tmp.put_f32_le(self.ay);
18825        __tmp.put_f32_le(self.az);
18826        for val in &self.covariance {
18827            __tmp.put_f32_le(*val);
18828        }
18829        __tmp.put_u8(self.estimator_type as u8);
18830        if matches!(version, MavlinkVersion::V2) {
18831            let len = __tmp.len();
18832            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18833        } else {
18834            __tmp.len()
18835        }
18836    }
18837}
18838#[doc = "The offset in X, Y, Z and yaw between the LOCAL_POSITION_NED messages of MAV X and the global coordinate frame in NED coordinates. Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
18839#[doc = ""]
18840#[doc = "ID: 89"]
18841#[derive(Debug, Clone, PartialEq)]
18842#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18843#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18844#[cfg_attr(feature = "ts", derive(TS))]
18845#[cfg_attr(feature = "ts", ts(export))]
18846pub struct LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
18847    #[doc = "Timestamp (time since system boot)."]
18848    pub time_boot_ms: u32,
18849    #[doc = "X Position"]
18850    pub x: f32,
18851    #[doc = "Y Position"]
18852    pub y: f32,
18853    #[doc = "Z Position"]
18854    pub z: f32,
18855    #[doc = "Roll"]
18856    pub roll: f32,
18857    #[doc = "Pitch"]
18858    pub pitch: f32,
18859    #[doc = "Yaw"]
18860    pub yaw: f32,
18861}
18862impl LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
18863    pub const ENCODED_LEN: usize = 28usize;
18864    pub const DEFAULT: Self = Self {
18865        time_boot_ms: 0_u32,
18866        x: 0.0_f32,
18867        y: 0.0_f32,
18868        z: 0.0_f32,
18869        roll: 0.0_f32,
18870        pitch: 0.0_f32,
18871        yaw: 0.0_f32,
18872    };
18873    #[cfg(feature = "arbitrary")]
18874    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18875        use arbitrary::{Arbitrary, Unstructured};
18876        let mut buf = [0u8; 1024];
18877        rng.fill_bytes(&mut buf);
18878        let mut unstructured = Unstructured::new(&buf);
18879        Self::arbitrary(&mut unstructured).unwrap_or_default()
18880    }
18881}
18882impl Default for LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
18883    fn default() -> Self {
18884        Self::DEFAULT.clone()
18885    }
18886}
18887impl MessageData for LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
18888    type Message = MavMessage;
18889    const ID: u32 = 89u32;
18890    const NAME: &'static str = "LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET";
18891    const EXTRA_CRC: u8 = 231u8;
18892    const ENCODED_LEN: usize = 28usize;
18893    fn deser(
18894        _version: MavlinkVersion,
18895        __input: &[u8],
18896    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18897        let avail_len = __input.len();
18898        let mut payload_buf = [0; Self::ENCODED_LEN];
18899        let mut buf = if avail_len < Self::ENCODED_LEN {
18900            payload_buf[0..avail_len].copy_from_slice(__input);
18901            Bytes::new(&payload_buf)
18902        } else {
18903            Bytes::new(__input)
18904        };
18905        let mut __struct = Self::default();
18906        __struct.time_boot_ms = buf.get_u32_le();
18907        __struct.x = buf.get_f32_le();
18908        __struct.y = buf.get_f32_le();
18909        __struct.z = buf.get_f32_le();
18910        __struct.roll = buf.get_f32_le();
18911        __struct.pitch = buf.get_f32_le();
18912        __struct.yaw = buf.get_f32_le();
18913        Ok(__struct)
18914    }
18915    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18916        let mut __tmp = BytesMut::new(bytes);
18917        #[allow(clippy::absurd_extreme_comparisons)]
18918        #[allow(unused_comparisons)]
18919        if __tmp.remaining() < Self::ENCODED_LEN {
18920            panic!(
18921                "buffer is too small (need {} bytes, but got {})",
18922                Self::ENCODED_LEN,
18923                __tmp.remaining(),
18924            )
18925        }
18926        __tmp.put_u32_le(self.time_boot_ms);
18927        __tmp.put_f32_le(self.x);
18928        __tmp.put_f32_le(self.y);
18929        __tmp.put_f32_le(self.z);
18930        __tmp.put_f32_le(self.roll);
18931        __tmp.put_f32_le(self.pitch);
18932        __tmp.put_f32_le(self.yaw);
18933        if matches!(version, MavlinkVersion::V2) {
18934            let len = __tmp.len();
18935            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18936        } else {
18937            __tmp.len()
18938        }
18939    }
18940}
18941#[doc = "An ack for a LOGGING_DATA_ACKED message."]
18942#[doc = ""]
18943#[doc = "ID: 268"]
18944#[derive(Debug, Clone, PartialEq)]
18945#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18946#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18947#[cfg_attr(feature = "ts", derive(TS))]
18948#[cfg_attr(feature = "ts", ts(export))]
18949pub struct LOGGING_ACK_DATA {
18950    #[doc = "sequence number (must match the one in LOGGING_DATA_ACKED)"]
18951    pub sequence: u16,
18952    #[doc = "system ID of the target"]
18953    pub target_system: u8,
18954    #[doc = "component ID of the target"]
18955    pub target_component: u8,
18956}
18957impl LOGGING_ACK_DATA {
18958    pub const ENCODED_LEN: usize = 4usize;
18959    pub const DEFAULT: Self = Self {
18960        sequence: 0_u16,
18961        target_system: 0_u8,
18962        target_component: 0_u8,
18963    };
18964    #[cfg(feature = "arbitrary")]
18965    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18966        use arbitrary::{Arbitrary, Unstructured};
18967        let mut buf = [0u8; 1024];
18968        rng.fill_bytes(&mut buf);
18969        let mut unstructured = Unstructured::new(&buf);
18970        Self::arbitrary(&mut unstructured).unwrap_or_default()
18971    }
18972}
18973impl Default for LOGGING_ACK_DATA {
18974    fn default() -> Self {
18975        Self::DEFAULT.clone()
18976    }
18977}
18978impl MessageData for LOGGING_ACK_DATA {
18979    type Message = MavMessage;
18980    const ID: u32 = 268u32;
18981    const NAME: &'static str = "LOGGING_ACK";
18982    const EXTRA_CRC: u8 = 14u8;
18983    const ENCODED_LEN: usize = 4usize;
18984    fn deser(
18985        _version: MavlinkVersion,
18986        __input: &[u8],
18987    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18988        let avail_len = __input.len();
18989        let mut payload_buf = [0; Self::ENCODED_LEN];
18990        let mut buf = if avail_len < Self::ENCODED_LEN {
18991            payload_buf[0..avail_len].copy_from_slice(__input);
18992            Bytes::new(&payload_buf)
18993        } else {
18994            Bytes::new(__input)
18995        };
18996        let mut __struct = Self::default();
18997        __struct.sequence = buf.get_u16_le();
18998        __struct.target_system = buf.get_u8();
18999        __struct.target_component = buf.get_u8();
19000        Ok(__struct)
19001    }
19002    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19003        let mut __tmp = BytesMut::new(bytes);
19004        #[allow(clippy::absurd_extreme_comparisons)]
19005        #[allow(unused_comparisons)]
19006        if __tmp.remaining() < Self::ENCODED_LEN {
19007            panic!(
19008                "buffer is too small (need {} bytes, but got {})",
19009                Self::ENCODED_LEN,
19010                __tmp.remaining(),
19011            )
19012        }
19013        __tmp.put_u16_le(self.sequence);
19014        __tmp.put_u8(self.target_system);
19015        __tmp.put_u8(self.target_component);
19016        if matches!(version, MavlinkVersion::V2) {
19017            let len = __tmp.len();
19018            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19019        } else {
19020            __tmp.len()
19021        }
19022    }
19023}
19024#[doc = "A message containing logged data (see also MAV_CMD_LOGGING_START)."]
19025#[doc = ""]
19026#[doc = "ID: 266"]
19027#[derive(Debug, Clone, PartialEq)]
19028#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19029#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19030#[cfg_attr(feature = "ts", derive(TS))]
19031#[cfg_attr(feature = "ts", ts(export))]
19032pub struct LOGGING_DATA_DATA {
19033    #[doc = "sequence number (can wrap)"]
19034    pub sequence: u16,
19035    #[doc = "system ID of the target"]
19036    pub target_system: u8,
19037    #[doc = "component ID of the target"]
19038    pub target_component: u8,
19039    #[doc = "data length"]
19040    pub length: u8,
19041    #[doc = "offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists)."]
19042    pub first_message_offset: u8,
19043    #[doc = "logged data"]
19044    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
19045    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
19046    pub data: [u8; 249],
19047}
19048impl LOGGING_DATA_DATA {
19049    pub const ENCODED_LEN: usize = 255usize;
19050    pub const DEFAULT: Self = Self {
19051        sequence: 0_u16,
19052        target_system: 0_u8,
19053        target_component: 0_u8,
19054        length: 0_u8,
19055        first_message_offset: 0_u8,
19056        data: [0_u8; 249usize],
19057    };
19058    #[cfg(feature = "arbitrary")]
19059    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19060        use arbitrary::{Arbitrary, Unstructured};
19061        let mut buf = [0u8; 1024];
19062        rng.fill_bytes(&mut buf);
19063        let mut unstructured = Unstructured::new(&buf);
19064        Self::arbitrary(&mut unstructured).unwrap_or_default()
19065    }
19066}
19067impl Default for LOGGING_DATA_DATA {
19068    fn default() -> Self {
19069        Self::DEFAULT.clone()
19070    }
19071}
19072impl MessageData for LOGGING_DATA_DATA {
19073    type Message = MavMessage;
19074    const ID: u32 = 266u32;
19075    const NAME: &'static str = "LOGGING_DATA";
19076    const EXTRA_CRC: u8 = 193u8;
19077    const ENCODED_LEN: usize = 255usize;
19078    fn deser(
19079        _version: MavlinkVersion,
19080        __input: &[u8],
19081    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19082        let avail_len = __input.len();
19083        let mut payload_buf = [0; Self::ENCODED_LEN];
19084        let mut buf = if avail_len < Self::ENCODED_LEN {
19085            payload_buf[0..avail_len].copy_from_slice(__input);
19086            Bytes::new(&payload_buf)
19087        } else {
19088            Bytes::new(__input)
19089        };
19090        let mut __struct = Self::default();
19091        __struct.sequence = buf.get_u16_le();
19092        __struct.target_system = buf.get_u8();
19093        __struct.target_component = buf.get_u8();
19094        __struct.length = buf.get_u8();
19095        __struct.first_message_offset = buf.get_u8();
19096        for v in &mut __struct.data {
19097            let val = buf.get_u8();
19098            *v = val;
19099        }
19100        Ok(__struct)
19101    }
19102    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19103        let mut __tmp = BytesMut::new(bytes);
19104        #[allow(clippy::absurd_extreme_comparisons)]
19105        #[allow(unused_comparisons)]
19106        if __tmp.remaining() < Self::ENCODED_LEN {
19107            panic!(
19108                "buffer is too small (need {} bytes, but got {})",
19109                Self::ENCODED_LEN,
19110                __tmp.remaining(),
19111            )
19112        }
19113        __tmp.put_u16_le(self.sequence);
19114        __tmp.put_u8(self.target_system);
19115        __tmp.put_u8(self.target_component);
19116        __tmp.put_u8(self.length);
19117        __tmp.put_u8(self.first_message_offset);
19118        for val in &self.data {
19119            __tmp.put_u8(*val);
19120        }
19121        if matches!(version, MavlinkVersion::V2) {
19122            let len = __tmp.len();
19123            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19124        } else {
19125            __tmp.len()
19126        }
19127    }
19128}
19129#[doc = "A message containing logged data which requires a LOGGING_ACK to be sent back."]
19130#[doc = ""]
19131#[doc = "ID: 267"]
19132#[derive(Debug, Clone, PartialEq)]
19133#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19134#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19135#[cfg_attr(feature = "ts", derive(TS))]
19136#[cfg_attr(feature = "ts", ts(export))]
19137pub struct LOGGING_DATA_ACKED_DATA {
19138    #[doc = "sequence number (can wrap)"]
19139    pub sequence: u16,
19140    #[doc = "system ID of the target"]
19141    pub target_system: u8,
19142    #[doc = "component ID of the target"]
19143    pub target_component: u8,
19144    #[doc = "data length"]
19145    pub length: u8,
19146    #[doc = "offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists)."]
19147    pub first_message_offset: u8,
19148    #[doc = "logged data"]
19149    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
19150    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
19151    pub data: [u8; 249],
19152}
19153impl LOGGING_DATA_ACKED_DATA {
19154    pub const ENCODED_LEN: usize = 255usize;
19155    pub const DEFAULT: Self = Self {
19156        sequence: 0_u16,
19157        target_system: 0_u8,
19158        target_component: 0_u8,
19159        length: 0_u8,
19160        first_message_offset: 0_u8,
19161        data: [0_u8; 249usize],
19162    };
19163    #[cfg(feature = "arbitrary")]
19164    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19165        use arbitrary::{Arbitrary, Unstructured};
19166        let mut buf = [0u8; 1024];
19167        rng.fill_bytes(&mut buf);
19168        let mut unstructured = Unstructured::new(&buf);
19169        Self::arbitrary(&mut unstructured).unwrap_or_default()
19170    }
19171}
19172impl Default for LOGGING_DATA_ACKED_DATA {
19173    fn default() -> Self {
19174        Self::DEFAULT.clone()
19175    }
19176}
19177impl MessageData for LOGGING_DATA_ACKED_DATA {
19178    type Message = MavMessage;
19179    const ID: u32 = 267u32;
19180    const NAME: &'static str = "LOGGING_DATA_ACKED";
19181    const EXTRA_CRC: u8 = 35u8;
19182    const ENCODED_LEN: usize = 255usize;
19183    fn deser(
19184        _version: MavlinkVersion,
19185        __input: &[u8],
19186    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19187        let avail_len = __input.len();
19188        let mut payload_buf = [0; Self::ENCODED_LEN];
19189        let mut buf = if avail_len < Self::ENCODED_LEN {
19190            payload_buf[0..avail_len].copy_from_slice(__input);
19191            Bytes::new(&payload_buf)
19192        } else {
19193            Bytes::new(__input)
19194        };
19195        let mut __struct = Self::default();
19196        __struct.sequence = buf.get_u16_le();
19197        __struct.target_system = buf.get_u8();
19198        __struct.target_component = buf.get_u8();
19199        __struct.length = buf.get_u8();
19200        __struct.first_message_offset = buf.get_u8();
19201        for v in &mut __struct.data {
19202            let val = buf.get_u8();
19203            *v = val;
19204        }
19205        Ok(__struct)
19206    }
19207    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19208        let mut __tmp = BytesMut::new(bytes);
19209        #[allow(clippy::absurd_extreme_comparisons)]
19210        #[allow(unused_comparisons)]
19211        if __tmp.remaining() < Self::ENCODED_LEN {
19212            panic!(
19213                "buffer is too small (need {} bytes, but got {})",
19214                Self::ENCODED_LEN,
19215                __tmp.remaining(),
19216            )
19217        }
19218        __tmp.put_u16_le(self.sequence);
19219        __tmp.put_u8(self.target_system);
19220        __tmp.put_u8(self.target_component);
19221        __tmp.put_u8(self.length);
19222        __tmp.put_u8(self.first_message_offset);
19223        for val in &self.data {
19224            __tmp.put_u8(*val);
19225        }
19226        if matches!(version, MavlinkVersion::V2) {
19227            let len = __tmp.len();
19228            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19229        } else {
19230            __tmp.len()
19231        }
19232    }
19233}
19234#[doc = "Reply to LOG_REQUEST_DATA."]
19235#[doc = ""]
19236#[doc = "ID: 120"]
19237#[derive(Debug, Clone, PartialEq)]
19238#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19239#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19240#[cfg_attr(feature = "ts", derive(TS))]
19241#[cfg_attr(feature = "ts", ts(export))]
19242pub struct LOG_DATA_DATA {
19243    #[doc = "Offset into the log"]
19244    pub ofs: u32,
19245    #[doc = "Log id (from LOG_ENTRY reply)"]
19246    pub id: u16,
19247    #[doc = "Number of bytes (zero for end of log)"]
19248    pub count: u8,
19249    #[doc = "log data"]
19250    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
19251    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
19252    pub data: [u8; 90],
19253}
19254impl LOG_DATA_DATA {
19255    pub const ENCODED_LEN: usize = 97usize;
19256    pub const DEFAULT: Self = Self {
19257        ofs: 0_u32,
19258        id: 0_u16,
19259        count: 0_u8,
19260        data: [0_u8; 90usize],
19261    };
19262    #[cfg(feature = "arbitrary")]
19263    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19264        use arbitrary::{Arbitrary, Unstructured};
19265        let mut buf = [0u8; 1024];
19266        rng.fill_bytes(&mut buf);
19267        let mut unstructured = Unstructured::new(&buf);
19268        Self::arbitrary(&mut unstructured).unwrap_or_default()
19269    }
19270}
19271impl Default for LOG_DATA_DATA {
19272    fn default() -> Self {
19273        Self::DEFAULT.clone()
19274    }
19275}
19276impl MessageData for LOG_DATA_DATA {
19277    type Message = MavMessage;
19278    const ID: u32 = 120u32;
19279    const NAME: &'static str = "LOG_DATA";
19280    const EXTRA_CRC: u8 = 134u8;
19281    const ENCODED_LEN: usize = 97usize;
19282    fn deser(
19283        _version: MavlinkVersion,
19284        __input: &[u8],
19285    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19286        let avail_len = __input.len();
19287        let mut payload_buf = [0; Self::ENCODED_LEN];
19288        let mut buf = if avail_len < Self::ENCODED_LEN {
19289            payload_buf[0..avail_len].copy_from_slice(__input);
19290            Bytes::new(&payload_buf)
19291        } else {
19292            Bytes::new(__input)
19293        };
19294        let mut __struct = Self::default();
19295        __struct.ofs = buf.get_u32_le();
19296        __struct.id = buf.get_u16_le();
19297        __struct.count = buf.get_u8();
19298        for v in &mut __struct.data {
19299            let val = buf.get_u8();
19300            *v = val;
19301        }
19302        Ok(__struct)
19303    }
19304    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19305        let mut __tmp = BytesMut::new(bytes);
19306        #[allow(clippy::absurd_extreme_comparisons)]
19307        #[allow(unused_comparisons)]
19308        if __tmp.remaining() < Self::ENCODED_LEN {
19309            panic!(
19310                "buffer is too small (need {} bytes, but got {})",
19311                Self::ENCODED_LEN,
19312                __tmp.remaining(),
19313            )
19314        }
19315        __tmp.put_u32_le(self.ofs);
19316        __tmp.put_u16_le(self.id);
19317        __tmp.put_u8(self.count);
19318        for val in &self.data {
19319            __tmp.put_u8(*val);
19320        }
19321        if matches!(version, MavlinkVersion::V2) {
19322            let len = __tmp.len();
19323            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19324        } else {
19325            __tmp.len()
19326        }
19327    }
19328}
19329#[doc = "Reply to LOG_REQUEST_LIST."]
19330#[doc = ""]
19331#[doc = "ID: 118"]
19332#[derive(Debug, Clone, PartialEq)]
19333#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19334#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19335#[cfg_attr(feature = "ts", derive(TS))]
19336#[cfg_attr(feature = "ts", ts(export))]
19337pub struct LOG_ENTRY_DATA {
19338    #[doc = "UTC timestamp of log since 1970, or 0 if not available"]
19339    pub time_utc: u32,
19340    #[doc = "Size of the log (may be approximate)"]
19341    pub size: u32,
19342    #[doc = "Log id"]
19343    pub id: u16,
19344    #[doc = "Total number of logs"]
19345    pub num_logs: u16,
19346    #[doc = "High log number"]
19347    pub last_log_num: u16,
19348}
19349impl LOG_ENTRY_DATA {
19350    pub const ENCODED_LEN: usize = 14usize;
19351    pub const DEFAULT: Self = Self {
19352        time_utc: 0_u32,
19353        size: 0_u32,
19354        id: 0_u16,
19355        num_logs: 0_u16,
19356        last_log_num: 0_u16,
19357    };
19358    #[cfg(feature = "arbitrary")]
19359    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19360        use arbitrary::{Arbitrary, Unstructured};
19361        let mut buf = [0u8; 1024];
19362        rng.fill_bytes(&mut buf);
19363        let mut unstructured = Unstructured::new(&buf);
19364        Self::arbitrary(&mut unstructured).unwrap_or_default()
19365    }
19366}
19367impl Default for LOG_ENTRY_DATA {
19368    fn default() -> Self {
19369        Self::DEFAULT.clone()
19370    }
19371}
19372impl MessageData for LOG_ENTRY_DATA {
19373    type Message = MavMessage;
19374    const ID: u32 = 118u32;
19375    const NAME: &'static str = "LOG_ENTRY";
19376    const EXTRA_CRC: u8 = 56u8;
19377    const ENCODED_LEN: usize = 14usize;
19378    fn deser(
19379        _version: MavlinkVersion,
19380        __input: &[u8],
19381    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19382        let avail_len = __input.len();
19383        let mut payload_buf = [0; Self::ENCODED_LEN];
19384        let mut buf = if avail_len < Self::ENCODED_LEN {
19385            payload_buf[0..avail_len].copy_from_slice(__input);
19386            Bytes::new(&payload_buf)
19387        } else {
19388            Bytes::new(__input)
19389        };
19390        let mut __struct = Self::default();
19391        __struct.time_utc = buf.get_u32_le();
19392        __struct.size = buf.get_u32_le();
19393        __struct.id = buf.get_u16_le();
19394        __struct.num_logs = buf.get_u16_le();
19395        __struct.last_log_num = buf.get_u16_le();
19396        Ok(__struct)
19397    }
19398    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19399        let mut __tmp = BytesMut::new(bytes);
19400        #[allow(clippy::absurd_extreme_comparisons)]
19401        #[allow(unused_comparisons)]
19402        if __tmp.remaining() < Self::ENCODED_LEN {
19403            panic!(
19404                "buffer is too small (need {} bytes, but got {})",
19405                Self::ENCODED_LEN,
19406                __tmp.remaining(),
19407            )
19408        }
19409        __tmp.put_u32_le(self.time_utc);
19410        __tmp.put_u32_le(self.size);
19411        __tmp.put_u16_le(self.id);
19412        __tmp.put_u16_le(self.num_logs);
19413        __tmp.put_u16_le(self.last_log_num);
19414        if matches!(version, MavlinkVersion::V2) {
19415            let len = __tmp.len();
19416            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19417        } else {
19418            __tmp.len()
19419        }
19420    }
19421}
19422#[doc = "Erase all logs."]
19423#[doc = ""]
19424#[doc = "ID: 121"]
19425#[derive(Debug, Clone, PartialEq)]
19426#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19427#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19428#[cfg_attr(feature = "ts", derive(TS))]
19429#[cfg_attr(feature = "ts", ts(export))]
19430pub struct LOG_ERASE_DATA {
19431    #[doc = "System ID"]
19432    pub target_system: u8,
19433    #[doc = "Component ID"]
19434    pub target_component: u8,
19435}
19436impl LOG_ERASE_DATA {
19437    pub const ENCODED_LEN: usize = 2usize;
19438    pub const DEFAULT: Self = Self {
19439        target_system: 0_u8,
19440        target_component: 0_u8,
19441    };
19442    #[cfg(feature = "arbitrary")]
19443    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19444        use arbitrary::{Arbitrary, Unstructured};
19445        let mut buf = [0u8; 1024];
19446        rng.fill_bytes(&mut buf);
19447        let mut unstructured = Unstructured::new(&buf);
19448        Self::arbitrary(&mut unstructured).unwrap_or_default()
19449    }
19450}
19451impl Default for LOG_ERASE_DATA {
19452    fn default() -> Self {
19453        Self::DEFAULT.clone()
19454    }
19455}
19456impl MessageData for LOG_ERASE_DATA {
19457    type Message = MavMessage;
19458    const ID: u32 = 121u32;
19459    const NAME: &'static str = "LOG_ERASE";
19460    const EXTRA_CRC: u8 = 237u8;
19461    const ENCODED_LEN: usize = 2usize;
19462    fn deser(
19463        _version: MavlinkVersion,
19464        __input: &[u8],
19465    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19466        let avail_len = __input.len();
19467        let mut payload_buf = [0; Self::ENCODED_LEN];
19468        let mut buf = if avail_len < Self::ENCODED_LEN {
19469            payload_buf[0..avail_len].copy_from_slice(__input);
19470            Bytes::new(&payload_buf)
19471        } else {
19472            Bytes::new(__input)
19473        };
19474        let mut __struct = Self::default();
19475        __struct.target_system = buf.get_u8();
19476        __struct.target_component = buf.get_u8();
19477        Ok(__struct)
19478    }
19479    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19480        let mut __tmp = BytesMut::new(bytes);
19481        #[allow(clippy::absurd_extreme_comparisons)]
19482        #[allow(unused_comparisons)]
19483        if __tmp.remaining() < Self::ENCODED_LEN {
19484            panic!(
19485                "buffer is too small (need {} bytes, but got {})",
19486                Self::ENCODED_LEN,
19487                __tmp.remaining(),
19488            )
19489        }
19490        __tmp.put_u8(self.target_system);
19491        __tmp.put_u8(self.target_component);
19492        if matches!(version, MavlinkVersion::V2) {
19493            let len = __tmp.len();
19494            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19495        } else {
19496            __tmp.len()
19497        }
19498    }
19499}
19500#[doc = "Request a chunk of a log."]
19501#[doc = ""]
19502#[doc = "ID: 119"]
19503#[derive(Debug, Clone, PartialEq)]
19504#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19505#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19506#[cfg_attr(feature = "ts", derive(TS))]
19507#[cfg_attr(feature = "ts", ts(export))]
19508pub struct LOG_REQUEST_DATA_DATA {
19509    #[doc = "Offset into the log"]
19510    pub ofs: u32,
19511    #[doc = "Number of bytes"]
19512    pub count: u32,
19513    #[doc = "Log id (from LOG_ENTRY reply)"]
19514    pub id: u16,
19515    #[doc = "System ID"]
19516    pub target_system: u8,
19517    #[doc = "Component ID"]
19518    pub target_component: u8,
19519}
19520impl LOG_REQUEST_DATA_DATA {
19521    pub const ENCODED_LEN: usize = 12usize;
19522    pub const DEFAULT: Self = Self {
19523        ofs: 0_u32,
19524        count: 0_u32,
19525        id: 0_u16,
19526        target_system: 0_u8,
19527        target_component: 0_u8,
19528    };
19529    #[cfg(feature = "arbitrary")]
19530    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19531        use arbitrary::{Arbitrary, Unstructured};
19532        let mut buf = [0u8; 1024];
19533        rng.fill_bytes(&mut buf);
19534        let mut unstructured = Unstructured::new(&buf);
19535        Self::arbitrary(&mut unstructured).unwrap_or_default()
19536    }
19537}
19538impl Default for LOG_REQUEST_DATA_DATA {
19539    fn default() -> Self {
19540        Self::DEFAULT.clone()
19541    }
19542}
19543impl MessageData for LOG_REQUEST_DATA_DATA {
19544    type Message = MavMessage;
19545    const ID: u32 = 119u32;
19546    const NAME: &'static str = "LOG_REQUEST_DATA";
19547    const EXTRA_CRC: u8 = 116u8;
19548    const ENCODED_LEN: usize = 12usize;
19549    fn deser(
19550        _version: MavlinkVersion,
19551        __input: &[u8],
19552    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19553        let avail_len = __input.len();
19554        let mut payload_buf = [0; Self::ENCODED_LEN];
19555        let mut buf = if avail_len < Self::ENCODED_LEN {
19556            payload_buf[0..avail_len].copy_from_slice(__input);
19557            Bytes::new(&payload_buf)
19558        } else {
19559            Bytes::new(__input)
19560        };
19561        let mut __struct = Self::default();
19562        __struct.ofs = buf.get_u32_le();
19563        __struct.count = buf.get_u32_le();
19564        __struct.id = buf.get_u16_le();
19565        __struct.target_system = buf.get_u8();
19566        __struct.target_component = buf.get_u8();
19567        Ok(__struct)
19568    }
19569    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19570        let mut __tmp = BytesMut::new(bytes);
19571        #[allow(clippy::absurd_extreme_comparisons)]
19572        #[allow(unused_comparisons)]
19573        if __tmp.remaining() < Self::ENCODED_LEN {
19574            panic!(
19575                "buffer is too small (need {} bytes, but got {})",
19576                Self::ENCODED_LEN,
19577                __tmp.remaining(),
19578            )
19579        }
19580        __tmp.put_u32_le(self.ofs);
19581        __tmp.put_u32_le(self.count);
19582        __tmp.put_u16_le(self.id);
19583        __tmp.put_u8(self.target_system);
19584        __tmp.put_u8(self.target_component);
19585        if matches!(version, MavlinkVersion::V2) {
19586            let len = __tmp.len();
19587            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19588        } else {
19589            __tmp.len()
19590        }
19591    }
19592}
19593#[doc = "Stop log transfer and resume normal logging."]
19594#[doc = ""]
19595#[doc = "ID: 122"]
19596#[derive(Debug, Clone, PartialEq)]
19597#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19598#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19599#[cfg_attr(feature = "ts", derive(TS))]
19600#[cfg_attr(feature = "ts", ts(export))]
19601pub struct LOG_REQUEST_END_DATA {
19602    #[doc = "System ID"]
19603    pub target_system: u8,
19604    #[doc = "Component ID"]
19605    pub target_component: u8,
19606}
19607impl LOG_REQUEST_END_DATA {
19608    pub const ENCODED_LEN: usize = 2usize;
19609    pub const DEFAULT: Self = Self {
19610        target_system: 0_u8,
19611        target_component: 0_u8,
19612    };
19613    #[cfg(feature = "arbitrary")]
19614    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19615        use arbitrary::{Arbitrary, Unstructured};
19616        let mut buf = [0u8; 1024];
19617        rng.fill_bytes(&mut buf);
19618        let mut unstructured = Unstructured::new(&buf);
19619        Self::arbitrary(&mut unstructured).unwrap_or_default()
19620    }
19621}
19622impl Default for LOG_REQUEST_END_DATA {
19623    fn default() -> Self {
19624        Self::DEFAULT.clone()
19625    }
19626}
19627impl MessageData for LOG_REQUEST_END_DATA {
19628    type Message = MavMessage;
19629    const ID: u32 = 122u32;
19630    const NAME: &'static str = "LOG_REQUEST_END";
19631    const EXTRA_CRC: u8 = 203u8;
19632    const ENCODED_LEN: usize = 2usize;
19633    fn deser(
19634        _version: MavlinkVersion,
19635        __input: &[u8],
19636    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19637        let avail_len = __input.len();
19638        let mut payload_buf = [0; Self::ENCODED_LEN];
19639        let mut buf = if avail_len < Self::ENCODED_LEN {
19640            payload_buf[0..avail_len].copy_from_slice(__input);
19641            Bytes::new(&payload_buf)
19642        } else {
19643            Bytes::new(__input)
19644        };
19645        let mut __struct = Self::default();
19646        __struct.target_system = buf.get_u8();
19647        __struct.target_component = buf.get_u8();
19648        Ok(__struct)
19649    }
19650    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19651        let mut __tmp = BytesMut::new(bytes);
19652        #[allow(clippy::absurd_extreme_comparisons)]
19653        #[allow(unused_comparisons)]
19654        if __tmp.remaining() < Self::ENCODED_LEN {
19655            panic!(
19656                "buffer is too small (need {} bytes, but got {})",
19657                Self::ENCODED_LEN,
19658                __tmp.remaining(),
19659            )
19660        }
19661        __tmp.put_u8(self.target_system);
19662        __tmp.put_u8(self.target_component);
19663        if matches!(version, MavlinkVersion::V2) {
19664            let len = __tmp.len();
19665            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19666        } else {
19667            __tmp.len()
19668        }
19669    }
19670}
19671#[doc = "Request a list of available logs. On some systems calling this may stop on-board logging until LOG_REQUEST_END is called. If there are no log files available this request shall be answered with one LOG_ENTRY message with id = 0 and num_logs = 0."]
19672#[doc = ""]
19673#[doc = "ID: 117"]
19674#[derive(Debug, Clone, PartialEq)]
19675#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19676#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19677#[cfg_attr(feature = "ts", derive(TS))]
19678#[cfg_attr(feature = "ts", ts(export))]
19679pub struct LOG_REQUEST_LIST_DATA {
19680    #[doc = "First log id (0 for first available)"]
19681    pub start: u16,
19682    #[doc = "Last log id (0xffff for last available)"]
19683    pub end: u16,
19684    #[doc = "System ID"]
19685    pub target_system: u8,
19686    #[doc = "Component ID"]
19687    pub target_component: u8,
19688}
19689impl LOG_REQUEST_LIST_DATA {
19690    pub const ENCODED_LEN: usize = 6usize;
19691    pub const DEFAULT: Self = Self {
19692        start: 0_u16,
19693        end: 0_u16,
19694        target_system: 0_u8,
19695        target_component: 0_u8,
19696    };
19697    #[cfg(feature = "arbitrary")]
19698    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19699        use arbitrary::{Arbitrary, Unstructured};
19700        let mut buf = [0u8; 1024];
19701        rng.fill_bytes(&mut buf);
19702        let mut unstructured = Unstructured::new(&buf);
19703        Self::arbitrary(&mut unstructured).unwrap_or_default()
19704    }
19705}
19706impl Default for LOG_REQUEST_LIST_DATA {
19707    fn default() -> Self {
19708        Self::DEFAULT.clone()
19709    }
19710}
19711impl MessageData for LOG_REQUEST_LIST_DATA {
19712    type Message = MavMessage;
19713    const ID: u32 = 117u32;
19714    const NAME: &'static str = "LOG_REQUEST_LIST";
19715    const EXTRA_CRC: u8 = 128u8;
19716    const ENCODED_LEN: usize = 6usize;
19717    fn deser(
19718        _version: MavlinkVersion,
19719        __input: &[u8],
19720    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19721        let avail_len = __input.len();
19722        let mut payload_buf = [0; Self::ENCODED_LEN];
19723        let mut buf = if avail_len < Self::ENCODED_LEN {
19724            payload_buf[0..avail_len].copy_from_slice(__input);
19725            Bytes::new(&payload_buf)
19726        } else {
19727            Bytes::new(__input)
19728        };
19729        let mut __struct = Self::default();
19730        __struct.start = buf.get_u16_le();
19731        __struct.end = buf.get_u16_le();
19732        __struct.target_system = buf.get_u8();
19733        __struct.target_component = buf.get_u8();
19734        Ok(__struct)
19735    }
19736    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19737        let mut __tmp = BytesMut::new(bytes);
19738        #[allow(clippy::absurd_extreme_comparisons)]
19739        #[allow(unused_comparisons)]
19740        if __tmp.remaining() < Self::ENCODED_LEN {
19741            panic!(
19742                "buffer is too small (need {} bytes, but got {})",
19743                Self::ENCODED_LEN,
19744                __tmp.remaining(),
19745            )
19746        }
19747        __tmp.put_u16_le(self.start);
19748        __tmp.put_u16_le(self.end);
19749        __tmp.put_u8(self.target_system);
19750        __tmp.put_u8(self.target_component);
19751        if matches!(version, MavlinkVersion::V2) {
19752            let len = __tmp.len();
19753            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19754        } else {
19755            __tmp.len()
19756        }
19757    }
19758}
19759#[doc = "Reports results of completed compass calibration. Sent until MAG_CAL_ACK received."]
19760#[doc = ""]
19761#[doc = "ID: 192"]
19762#[derive(Debug, Clone, PartialEq)]
19763#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19764#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19765#[cfg_attr(feature = "ts", derive(TS))]
19766#[cfg_attr(feature = "ts", ts(export))]
19767pub struct MAG_CAL_REPORT_DATA {
19768    #[doc = "RMS milligauss residuals."]
19769    pub fitness: f32,
19770    #[doc = "X offset."]
19771    pub ofs_x: f32,
19772    #[doc = "Y offset."]
19773    pub ofs_y: f32,
19774    #[doc = "Z offset."]
19775    pub ofs_z: f32,
19776    #[doc = "X diagonal (matrix 11)."]
19777    pub diag_x: f32,
19778    #[doc = "Y diagonal (matrix 22)."]
19779    pub diag_y: f32,
19780    #[doc = "Z diagonal (matrix 33)."]
19781    pub diag_z: f32,
19782    #[doc = "X off-diagonal (matrix 12 and 21)."]
19783    pub offdiag_x: f32,
19784    #[doc = "Y off-diagonal (matrix 13 and 31)."]
19785    pub offdiag_y: f32,
19786    #[doc = "Z off-diagonal (matrix 32 and 23)."]
19787    pub offdiag_z: f32,
19788    #[doc = "Compass being calibrated."]
19789    pub compass_id: u8,
19790    #[doc = "Bitmask of compasses being calibrated."]
19791    pub cal_mask: u8,
19792    #[doc = "Calibration Status."]
19793    pub cal_status: MagCalStatus,
19794    #[doc = "0=requires a MAV_CMD_DO_ACCEPT_MAG_CAL, 1=saved to parameters."]
19795    pub autosaved: u8,
19796    #[doc = "Confidence in orientation (higher is better)."]
19797    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19798    pub orientation_confidence: f32,
19799    #[doc = "orientation before calibration."]
19800    #[cfg_attr(feature = "serde", serde(default))]
19801    pub old_orientation: MavSensorOrientation,
19802    #[doc = "orientation after calibration."]
19803    #[cfg_attr(feature = "serde", serde(default))]
19804    pub new_orientation: MavSensorOrientation,
19805    #[doc = "field radius correction factor"]
19806    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19807    pub scale_factor: f32,
19808}
19809impl MAG_CAL_REPORT_DATA {
19810    pub const ENCODED_LEN: usize = 54usize;
19811    pub const DEFAULT: Self = Self {
19812        fitness: 0.0_f32,
19813        ofs_x: 0.0_f32,
19814        ofs_y: 0.0_f32,
19815        ofs_z: 0.0_f32,
19816        diag_x: 0.0_f32,
19817        diag_y: 0.0_f32,
19818        diag_z: 0.0_f32,
19819        offdiag_x: 0.0_f32,
19820        offdiag_y: 0.0_f32,
19821        offdiag_z: 0.0_f32,
19822        compass_id: 0_u8,
19823        cal_mask: 0_u8,
19824        cal_status: MagCalStatus::DEFAULT,
19825        autosaved: 0_u8,
19826        orientation_confidence: 0.0_f32,
19827        old_orientation: MavSensorOrientation::DEFAULT,
19828        new_orientation: MavSensorOrientation::DEFAULT,
19829        scale_factor: 0.0_f32,
19830    };
19831    #[cfg(feature = "arbitrary")]
19832    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19833        use arbitrary::{Arbitrary, Unstructured};
19834        let mut buf = [0u8; 1024];
19835        rng.fill_bytes(&mut buf);
19836        let mut unstructured = Unstructured::new(&buf);
19837        Self::arbitrary(&mut unstructured).unwrap_or_default()
19838    }
19839}
19840impl Default for MAG_CAL_REPORT_DATA {
19841    fn default() -> Self {
19842        Self::DEFAULT.clone()
19843    }
19844}
19845impl MessageData for MAG_CAL_REPORT_DATA {
19846    type Message = MavMessage;
19847    const ID: u32 = 192u32;
19848    const NAME: &'static str = "MAG_CAL_REPORT";
19849    const EXTRA_CRC: u8 = 36u8;
19850    const ENCODED_LEN: usize = 54usize;
19851    fn deser(
19852        _version: MavlinkVersion,
19853        __input: &[u8],
19854    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19855        let avail_len = __input.len();
19856        let mut payload_buf = [0; Self::ENCODED_LEN];
19857        let mut buf = if avail_len < Self::ENCODED_LEN {
19858            payload_buf[0..avail_len].copy_from_slice(__input);
19859            Bytes::new(&payload_buf)
19860        } else {
19861            Bytes::new(__input)
19862        };
19863        let mut __struct = Self::default();
19864        __struct.fitness = buf.get_f32_le();
19865        __struct.ofs_x = buf.get_f32_le();
19866        __struct.ofs_y = buf.get_f32_le();
19867        __struct.ofs_z = buf.get_f32_le();
19868        __struct.diag_x = buf.get_f32_le();
19869        __struct.diag_y = buf.get_f32_le();
19870        __struct.diag_z = buf.get_f32_le();
19871        __struct.offdiag_x = buf.get_f32_le();
19872        __struct.offdiag_y = buf.get_f32_le();
19873        __struct.offdiag_z = buf.get_f32_le();
19874        __struct.compass_id = buf.get_u8();
19875        __struct.cal_mask = buf.get_u8();
19876        let tmp = buf.get_u8();
19877        __struct.cal_status =
19878            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19879                enum_type: "MagCalStatus",
19880                value: tmp as u32,
19881            })?;
19882        __struct.autosaved = buf.get_u8();
19883        __struct.orientation_confidence = buf.get_f32_le();
19884        let tmp = buf.get_u8();
19885        __struct.old_orientation =
19886            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19887                enum_type: "MavSensorOrientation",
19888                value: tmp as u32,
19889            })?;
19890        let tmp = buf.get_u8();
19891        __struct.new_orientation =
19892            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19893                enum_type: "MavSensorOrientation",
19894                value: tmp as u32,
19895            })?;
19896        __struct.scale_factor = buf.get_f32_le();
19897        Ok(__struct)
19898    }
19899    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19900        let mut __tmp = BytesMut::new(bytes);
19901        #[allow(clippy::absurd_extreme_comparisons)]
19902        #[allow(unused_comparisons)]
19903        if __tmp.remaining() < Self::ENCODED_LEN {
19904            panic!(
19905                "buffer is too small (need {} bytes, but got {})",
19906                Self::ENCODED_LEN,
19907                __tmp.remaining(),
19908            )
19909        }
19910        __tmp.put_f32_le(self.fitness);
19911        __tmp.put_f32_le(self.ofs_x);
19912        __tmp.put_f32_le(self.ofs_y);
19913        __tmp.put_f32_le(self.ofs_z);
19914        __tmp.put_f32_le(self.diag_x);
19915        __tmp.put_f32_le(self.diag_y);
19916        __tmp.put_f32_le(self.diag_z);
19917        __tmp.put_f32_le(self.offdiag_x);
19918        __tmp.put_f32_le(self.offdiag_y);
19919        __tmp.put_f32_le(self.offdiag_z);
19920        __tmp.put_u8(self.compass_id);
19921        __tmp.put_u8(self.cal_mask);
19922        __tmp.put_u8(self.cal_status as u8);
19923        __tmp.put_u8(self.autosaved);
19924        if matches!(version, MavlinkVersion::V2) {
19925            __tmp.put_f32_le(self.orientation_confidence);
19926            __tmp.put_u8(self.old_orientation as u8);
19927            __tmp.put_u8(self.new_orientation as u8);
19928            __tmp.put_f32_le(self.scale_factor);
19929            let len = __tmp.len();
19930            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19931        } else {
19932            __tmp.len()
19933        }
19934    }
19935}
19936#[doc = "This message provides an API for manually controlling the vehicle using standard joystick axes nomenclature, along with a joystick-like input device. Unused axes can be disabled and buttons states are transmitted as individual on/off bits of a bitmask."]
19937#[doc = ""]
19938#[doc = "ID: 69"]
19939#[derive(Debug, Clone, PartialEq)]
19940#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19941#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19942#[cfg_attr(feature = "ts", derive(TS))]
19943#[cfg_attr(feature = "ts", ts(export))]
19944pub struct MANUAL_CONTROL_DATA {
19945    #[doc = "X-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to forward(1000)-backward(-1000) movement on a joystick and the pitch of a vehicle."]
19946    pub x: i16,
19947    #[doc = "Y-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to left(-1000)-right(1000) movement on a joystick and the roll of a vehicle."]
19948    pub y: i16,
19949    #[doc = "Z-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a separate slider movement with maximum being 1000 and minimum being -1000 on a joystick and the thrust of a vehicle. Positive values are positive thrust, negative values are negative thrust."]
19950    pub z: i16,
19951    #[doc = "R-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a twisting of the joystick, with counter-clockwise being 1000 and clockwise being -1000, and the yaw of a vehicle."]
19952    pub r: i16,
19953    #[doc = "A bitfield corresponding to the joystick buttons' 0-15 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 1."]
19954    pub buttons: u16,
19955    #[doc = "The system to be controlled."]
19956    pub target: u8,
19957    #[doc = "A bitfield corresponding to the joystick buttons' 16-31 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 16."]
19958    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19959    pub buttons2: u16,
19960    #[doc = "Set bits to 1 to indicate which of the following extension fields contain valid data: bit 0: pitch, bit 1: roll, bit 2: aux1, bit 3: aux2, bit 4: aux3, bit 5: aux4, bit 6: aux5, bit 7: aux6"]
19961    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19962    pub enabled_extensions: u8,
19963    #[doc = "Pitch-only-axis, normalized to the range [-1000,1000]. Generally corresponds to pitch on vehicles with additional degrees of freedom. Valid if bit 0 of enabled_extensions field is set. Set to 0 if invalid."]
19964    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19965    pub s: i16,
19966    #[doc = "Roll-only-axis, normalized to the range [-1000,1000]. Generally corresponds to roll on vehicles with additional degrees of freedom. Valid if bit 1 of enabled_extensions field is set. Set to 0 if invalid."]
19967    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19968    pub t: i16,
19969    #[doc = "Aux continuous input field 1. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 2 of enabled_extensions field is set. 0 if bit 2 is unset."]
19970    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19971    pub aux1: i16,
19972    #[doc = "Aux continuous input field 2. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 3 of enabled_extensions field is set. 0 if bit 3 is unset."]
19973    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19974    pub aux2: i16,
19975    #[doc = "Aux continuous input field 3. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 4 of enabled_extensions field is set. 0 if bit 4 is unset."]
19976    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19977    pub aux3: i16,
19978    #[doc = "Aux continuous input field 4. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 5 of enabled_extensions field is set. 0 if bit 5 is unset."]
19979    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19980    pub aux4: i16,
19981    #[doc = "Aux continuous input field 5. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 6 of enabled_extensions field is set. 0 if bit 6 is unset."]
19982    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19983    pub aux5: i16,
19984    #[doc = "Aux continuous input field 6. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 7 of enabled_extensions field is set. 0 if bit 7 is unset."]
19985    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19986    pub aux6: i16,
19987}
19988impl MANUAL_CONTROL_DATA {
19989    pub const ENCODED_LEN: usize = 30usize;
19990    pub const DEFAULT: Self = Self {
19991        x: 0_i16,
19992        y: 0_i16,
19993        z: 0_i16,
19994        r: 0_i16,
19995        buttons: 0_u16,
19996        target: 0_u8,
19997        buttons2: 0_u16,
19998        enabled_extensions: 0_u8,
19999        s: 0_i16,
20000        t: 0_i16,
20001        aux1: 0_i16,
20002        aux2: 0_i16,
20003        aux3: 0_i16,
20004        aux4: 0_i16,
20005        aux5: 0_i16,
20006        aux6: 0_i16,
20007    };
20008    #[cfg(feature = "arbitrary")]
20009    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20010        use arbitrary::{Arbitrary, Unstructured};
20011        let mut buf = [0u8; 1024];
20012        rng.fill_bytes(&mut buf);
20013        let mut unstructured = Unstructured::new(&buf);
20014        Self::arbitrary(&mut unstructured).unwrap_or_default()
20015    }
20016}
20017impl Default for MANUAL_CONTROL_DATA {
20018    fn default() -> Self {
20019        Self::DEFAULT.clone()
20020    }
20021}
20022impl MessageData for MANUAL_CONTROL_DATA {
20023    type Message = MavMessage;
20024    const ID: u32 = 69u32;
20025    const NAME: &'static str = "MANUAL_CONTROL";
20026    const EXTRA_CRC: u8 = 243u8;
20027    const ENCODED_LEN: usize = 30usize;
20028    fn deser(
20029        _version: MavlinkVersion,
20030        __input: &[u8],
20031    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20032        let avail_len = __input.len();
20033        let mut payload_buf = [0; Self::ENCODED_LEN];
20034        let mut buf = if avail_len < Self::ENCODED_LEN {
20035            payload_buf[0..avail_len].copy_from_slice(__input);
20036            Bytes::new(&payload_buf)
20037        } else {
20038            Bytes::new(__input)
20039        };
20040        let mut __struct = Self::default();
20041        __struct.x = buf.get_i16_le();
20042        __struct.y = buf.get_i16_le();
20043        __struct.z = buf.get_i16_le();
20044        __struct.r = buf.get_i16_le();
20045        __struct.buttons = buf.get_u16_le();
20046        __struct.target = buf.get_u8();
20047        __struct.buttons2 = buf.get_u16_le();
20048        __struct.enabled_extensions = buf.get_u8();
20049        __struct.s = buf.get_i16_le();
20050        __struct.t = buf.get_i16_le();
20051        __struct.aux1 = buf.get_i16_le();
20052        __struct.aux2 = buf.get_i16_le();
20053        __struct.aux3 = buf.get_i16_le();
20054        __struct.aux4 = buf.get_i16_le();
20055        __struct.aux5 = buf.get_i16_le();
20056        __struct.aux6 = buf.get_i16_le();
20057        Ok(__struct)
20058    }
20059    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20060        let mut __tmp = BytesMut::new(bytes);
20061        #[allow(clippy::absurd_extreme_comparisons)]
20062        #[allow(unused_comparisons)]
20063        if __tmp.remaining() < Self::ENCODED_LEN {
20064            panic!(
20065                "buffer is too small (need {} bytes, but got {})",
20066                Self::ENCODED_LEN,
20067                __tmp.remaining(),
20068            )
20069        }
20070        __tmp.put_i16_le(self.x);
20071        __tmp.put_i16_le(self.y);
20072        __tmp.put_i16_le(self.z);
20073        __tmp.put_i16_le(self.r);
20074        __tmp.put_u16_le(self.buttons);
20075        __tmp.put_u8(self.target);
20076        if matches!(version, MavlinkVersion::V2) {
20077            __tmp.put_u16_le(self.buttons2);
20078            __tmp.put_u8(self.enabled_extensions);
20079            __tmp.put_i16_le(self.s);
20080            __tmp.put_i16_le(self.t);
20081            __tmp.put_i16_le(self.aux1);
20082            __tmp.put_i16_le(self.aux2);
20083            __tmp.put_i16_le(self.aux3);
20084            __tmp.put_i16_le(self.aux4);
20085            __tmp.put_i16_le(self.aux5);
20086            __tmp.put_i16_le(self.aux6);
20087            let len = __tmp.len();
20088            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20089        } else {
20090            __tmp.len()
20091        }
20092    }
20093}
20094#[doc = "Setpoint in roll, pitch, yaw and thrust from the operator."]
20095#[doc = ""]
20096#[doc = "ID: 81"]
20097#[derive(Debug, Clone, PartialEq)]
20098#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20099#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20100#[cfg_attr(feature = "ts", derive(TS))]
20101#[cfg_attr(feature = "ts", ts(export))]
20102pub struct MANUAL_SETPOINT_DATA {
20103    #[doc = "Timestamp (time since system boot)."]
20104    pub time_boot_ms: u32,
20105    #[doc = "Desired roll rate"]
20106    pub roll: f32,
20107    #[doc = "Desired pitch rate"]
20108    pub pitch: f32,
20109    #[doc = "Desired yaw rate"]
20110    pub yaw: f32,
20111    #[doc = "Collective thrust, normalized to 0 .. 1"]
20112    pub thrust: f32,
20113    #[doc = "Flight mode switch position, 0.. 255"]
20114    pub mode_switch: u8,
20115    #[doc = "Override mode switch position, 0.. 255"]
20116    pub manual_override_switch: u8,
20117}
20118impl MANUAL_SETPOINT_DATA {
20119    pub const ENCODED_LEN: usize = 22usize;
20120    pub const DEFAULT: Self = Self {
20121        time_boot_ms: 0_u32,
20122        roll: 0.0_f32,
20123        pitch: 0.0_f32,
20124        yaw: 0.0_f32,
20125        thrust: 0.0_f32,
20126        mode_switch: 0_u8,
20127        manual_override_switch: 0_u8,
20128    };
20129    #[cfg(feature = "arbitrary")]
20130    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20131        use arbitrary::{Arbitrary, Unstructured};
20132        let mut buf = [0u8; 1024];
20133        rng.fill_bytes(&mut buf);
20134        let mut unstructured = Unstructured::new(&buf);
20135        Self::arbitrary(&mut unstructured).unwrap_or_default()
20136    }
20137}
20138impl Default for MANUAL_SETPOINT_DATA {
20139    fn default() -> Self {
20140        Self::DEFAULT.clone()
20141    }
20142}
20143impl MessageData for MANUAL_SETPOINT_DATA {
20144    type Message = MavMessage;
20145    const ID: u32 = 81u32;
20146    const NAME: &'static str = "MANUAL_SETPOINT";
20147    const EXTRA_CRC: u8 = 106u8;
20148    const ENCODED_LEN: usize = 22usize;
20149    fn deser(
20150        _version: MavlinkVersion,
20151        __input: &[u8],
20152    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20153        let avail_len = __input.len();
20154        let mut payload_buf = [0; Self::ENCODED_LEN];
20155        let mut buf = if avail_len < Self::ENCODED_LEN {
20156            payload_buf[0..avail_len].copy_from_slice(__input);
20157            Bytes::new(&payload_buf)
20158        } else {
20159            Bytes::new(__input)
20160        };
20161        let mut __struct = Self::default();
20162        __struct.time_boot_ms = buf.get_u32_le();
20163        __struct.roll = buf.get_f32_le();
20164        __struct.pitch = buf.get_f32_le();
20165        __struct.yaw = buf.get_f32_le();
20166        __struct.thrust = buf.get_f32_le();
20167        __struct.mode_switch = buf.get_u8();
20168        __struct.manual_override_switch = buf.get_u8();
20169        Ok(__struct)
20170    }
20171    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20172        let mut __tmp = BytesMut::new(bytes);
20173        #[allow(clippy::absurd_extreme_comparisons)]
20174        #[allow(unused_comparisons)]
20175        if __tmp.remaining() < Self::ENCODED_LEN {
20176            panic!(
20177                "buffer is too small (need {} bytes, but got {})",
20178                Self::ENCODED_LEN,
20179                __tmp.remaining(),
20180            )
20181        }
20182        __tmp.put_u32_le(self.time_boot_ms);
20183        __tmp.put_f32_le(self.roll);
20184        __tmp.put_f32_le(self.pitch);
20185        __tmp.put_f32_le(self.yaw);
20186        __tmp.put_f32_le(self.thrust);
20187        __tmp.put_u8(self.mode_switch);
20188        __tmp.put_u8(self.manual_override_switch);
20189        if matches!(version, MavlinkVersion::V2) {
20190            let len = __tmp.len();
20191            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20192        } else {
20193            __tmp.len()
20194        }
20195    }
20196}
20197#[doc = "Send raw controller memory. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
20198#[doc = ""]
20199#[doc = "ID: 249"]
20200#[derive(Debug, Clone, PartialEq)]
20201#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20202#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20203#[cfg_attr(feature = "ts", derive(TS))]
20204#[cfg_attr(feature = "ts", ts(export))]
20205pub struct MEMORY_VECT_DATA {
20206    #[doc = "Starting address of the debug variables"]
20207    pub address: u16,
20208    #[doc = "Version code of the type variable. 0=unknown, type ignored and assumed int16_t. 1=as below"]
20209    pub ver: u8,
20210    #[doc = "Type code of the memory variables. for ver = 1: 0=16 x int16_t, 1=16 x uint16_t, 2=16 x Q15, 3=16 x 1Q14"]
20211    pub mavtype: u8,
20212    #[doc = "Memory contents at specified address"]
20213    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20214    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
20215    pub value: [i8; 32],
20216}
20217impl MEMORY_VECT_DATA {
20218    pub const ENCODED_LEN: usize = 36usize;
20219    pub const DEFAULT: Self = Self {
20220        address: 0_u16,
20221        ver: 0_u8,
20222        mavtype: 0_u8,
20223        value: [0_i8; 32usize],
20224    };
20225    #[cfg(feature = "arbitrary")]
20226    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20227        use arbitrary::{Arbitrary, Unstructured};
20228        let mut buf = [0u8; 1024];
20229        rng.fill_bytes(&mut buf);
20230        let mut unstructured = Unstructured::new(&buf);
20231        Self::arbitrary(&mut unstructured).unwrap_or_default()
20232    }
20233}
20234impl Default for MEMORY_VECT_DATA {
20235    fn default() -> Self {
20236        Self::DEFAULT.clone()
20237    }
20238}
20239impl MessageData for MEMORY_VECT_DATA {
20240    type Message = MavMessage;
20241    const ID: u32 = 249u32;
20242    const NAME: &'static str = "MEMORY_VECT";
20243    const EXTRA_CRC: u8 = 204u8;
20244    const ENCODED_LEN: usize = 36usize;
20245    fn deser(
20246        _version: MavlinkVersion,
20247        __input: &[u8],
20248    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20249        let avail_len = __input.len();
20250        let mut payload_buf = [0; Self::ENCODED_LEN];
20251        let mut buf = if avail_len < Self::ENCODED_LEN {
20252            payload_buf[0..avail_len].copy_from_slice(__input);
20253            Bytes::new(&payload_buf)
20254        } else {
20255            Bytes::new(__input)
20256        };
20257        let mut __struct = Self::default();
20258        __struct.address = buf.get_u16_le();
20259        __struct.ver = buf.get_u8();
20260        __struct.mavtype = buf.get_u8();
20261        for v in &mut __struct.value {
20262            let val = buf.get_i8();
20263            *v = val;
20264        }
20265        Ok(__struct)
20266    }
20267    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20268        let mut __tmp = BytesMut::new(bytes);
20269        #[allow(clippy::absurd_extreme_comparisons)]
20270        #[allow(unused_comparisons)]
20271        if __tmp.remaining() < Self::ENCODED_LEN {
20272            panic!(
20273                "buffer is too small (need {} bytes, but got {})",
20274                Self::ENCODED_LEN,
20275                __tmp.remaining(),
20276            )
20277        }
20278        __tmp.put_u16_le(self.address);
20279        __tmp.put_u8(self.ver);
20280        __tmp.put_u8(self.mavtype);
20281        for val in &self.value {
20282            __tmp.put_i8(*val);
20283        }
20284        if matches!(version, MavlinkVersion::V2) {
20285            let len = __tmp.len();
20286            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20287        } else {
20288            __tmp.len()
20289        }
20290    }
20291}
20292#[doc = "The interval between messages for a particular MAVLink message ID.         This message is sent in response to the MAV_CMD_REQUEST_MESSAGE command with param1=244 (this message) and param2=message_id (the id of the message for which the interval is required). \tIt may also be sent in response to MAV_CMD_GET_MESSAGE_INTERVAL. \tThis interface replaces DATA_STREAM."]
20293#[doc = ""]
20294#[doc = "ID: 244"]
20295#[derive(Debug, Clone, PartialEq)]
20296#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20297#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20298#[cfg_attr(feature = "ts", derive(TS))]
20299#[cfg_attr(feature = "ts", ts(export))]
20300pub struct MESSAGE_INTERVAL_DATA {
20301    #[doc = "0 indicates the interval at which it is sent."]
20302    pub interval_us: i32,
20303    #[doc = "The ID of the requested MAVLink message. v1.0 is limited to 254 messages."]
20304    pub message_id: u16,
20305}
20306impl MESSAGE_INTERVAL_DATA {
20307    pub const ENCODED_LEN: usize = 6usize;
20308    pub const DEFAULT: Self = Self {
20309        interval_us: 0_i32,
20310        message_id: 0_u16,
20311    };
20312    #[cfg(feature = "arbitrary")]
20313    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20314        use arbitrary::{Arbitrary, Unstructured};
20315        let mut buf = [0u8; 1024];
20316        rng.fill_bytes(&mut buf);
20317        let mut unstructured = Unstructured::new(&buf);
20318        Self::arbitrary(&mut unstructured).unwrap_or_default()
20319    }
20320}
20321impl Default for MESSAGE_INTERVAL_DATA {
20322    fn default() -> Self {
20323        Self::DEFAULT.clone()
20324    }
20325}
20326impl MessageData for MESSAGE_INTERVAL_DATA {
20327    type Message = MavMessage;
20328    const ID: u32 = 244u32;
20329    const NAME: &'static str = "MESSAGE_INTERVAL";
20330    const EXTRA_CRC: u8 = 95u8;
20331    const ENCODED_LEN: usize = 6usize;
20332    fn deser(
20333        _version: MavlinkVersion,
20334        __input: &[u8],
20335    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20336        let avail_len = __input.len();
20337        let mut payload_buf = [0; Self::ENCODED_LEN];
20338        let mut buf = if avail_len < Self::ENCODED_LEN {
20339            payload_buf[0..avail_len].copy_from_slice(__input);
20340            Bytes::new(&payload_buf)
20341        } else {
20342            Bytes::new(__input)
20343        };
20344        let mut __struct = Self::default();
20345        __struct.interval_us = buf.get_i32_le();
20346        __struct.message_id = buf.get_u16_le();
20347        Ok(__struct)
20348    }
20349    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20350        let mut __tmp = BytesMut::new(bytes);
20351        #[allow(clippy::absurd_extreme_comparisons)]
20352        #[allow(unused_comparisons)]
20353        if __tmp.remaining() < Self::ENCODED_LEN {
20354            panic!(
20355                "buffer is too small (need {} bytes, but got {})",
20356                Self::ENCODED_LEN,
20357                __tmp.remaining(),
20358            )
20359        }
20360        __tmp.put_i32_le(self.interval_us);
20361        __tmp.put_u16_le(self.message_id);
20362        if matches!(version, MavlinkVersion::V2) {
20363            let len = __tmp.len();
20364            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20365        } else {
20366            __tmp.len()
20367        }
20368    }
20369}
20370#[doc = "Acknowledgment message during waypoint handling. The type field states if this message is a positive ack (type=0) or if an error happened (type=non-zero)."]
20371#[doc = ""]
20372#[doc = "ID: 47"]
20373#[derive(Debug, Clone, PartialEq)]
20374#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20375#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20376#[cfg_attr(feature = "ts", derive(TS))]
20377#[cfg_attr(feature = "ts", ts(export))]
20378pub struct MISSION_ACK_DATA {
20379    #[doc = "System ID"]
20380    pub target_system: u8,
20381    #[doc = "Component ID"]
20382    pub target_component: u8,
20383    #[doc = "Mission result."]
20384    pub mavtype: MavMissionResult,
20385    #[doc = "Mission type."]
20386    #[cfg_attr(feature = "serde", serde(default))]
20387    pub mission_type: MavMissionType,
20388    #[doc = "Id of new on-vehicle mission, fence, or rally point plan (on upload to vehicle).         The id is calculated and returned by a vehicle when a new plan is uploaded by a GCS.         The only requirement on the id is that it must change when there is any change to the on-vehicle plan type (there is no requirement that the id be globally unique).         0 on download from the vehicle to the GCS (on download the ID is set in MISSION_COUNT).         0 if plan ids are not supported.         The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded."]
20389    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20390    pub opaque_id: u32,
20391}
20392impl MISSION_ACK_DATA {
20393    pub const ENCODED_LEN: usize = 8usize;
20394    pub const DEFAULT: Self = Self {
20395        target_system: 0_u8,
20396        target_component: 0_u8,
20397        mavtype: MavMissionResult::DEFAULT,
20398        mission_type: MavMissionType::DEFAULT,
20399        opaque_id: 0_u32,
20400    };
20401    #[cfg(feature = "arbitrary")]
20402    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20403        use arbitrary::{Arbitrary, Unstructured};
20404        let mut buf = [0u8; 1024];
20405        rng.fill_bytes(&mut buf);
20406        let mut unstructured = Unstructured::new(&buf);
20407        Self::arbitrary(&mut unstructured).unwrap_or_default()
20408    }
20409}
20410impl Default for MISSION_ACK_DATA {
20411    fn default() -> Self {
20412        Self::DEFAULT.clone()
20413    }
20414}
20415impl MessageData for MISSION_ACK_DATA {
20416    type Message = MavMessage;
20417    const ID: u32 = 47u32;
20418    const NAME: &'static str = "MISSION_ACK";
20419    const EXTRA_CRC: u8 = 153u8;
20420    const ENCODED_LEN: usize = 8usize;
20421    fn deser(
20422        _version: MavlinkVersion,
20423        __input: &[u8],
20424    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20425        let avail_len = __input.len();
20426        let mut payload_buf = [0; Self::ENCODED_LEN];
20427        let mut buf = if avail_len < Self::ENCODED_LEN {
20428            payload_buf[0..avail_len].copy_from_slice(__input);
20429            Bytes::new(&payload_buf)
20430        } else {
20431            Bytes::new(__input)
20432        };
20433        let mut __struct = Self::default();
20434        __struct.target_system = buf.get_u8();
20435        __struct.target_component = buf.get_u8();
20436        let tmp = buf.get_u8();
20437        __struct.mavtype =
20438            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20439                enum_type: "MavMissionResult",
20440                value: tmp as u32,
20441            })?;
20442        let tmp = buf.get_u8();
20443        __struct.mission_type =
20444            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20445                enum_type: "MavMissionType",
20446                value: tmp as u32,
20447            })?;
20448        __struct.opaque_id = buf.get_u32_le();
20449        Ok(__struct)
20450    }
20451    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20452        let mut __tmp = BytesMut::new(bytes);
20453        #[allow(clippy::absurd_extreme_comparisons)]
20454        #[allow(unused_comparisons)]
20455        if __tmp.remaining() < Self::ENCODED_LEN {
20456            panic!(
20457                "buffer is too small (need {} bytes, but got {})",
20458                Self::ENCODED_LEN,
20459                __tmp.remaining(),
20460            )
20461        }
20462        __tmp.put_u8(self.target_system);
20463        __tmp.put_u8(self.target_component);
20464        __tmp.put_u8(self.mavtype as u8);
20465        if matches!(version, MavlinkVersion::V2) {
20466            __tmp.put_u8(self.mission_type as u8);
20467            __tmp.put_u32_le(self.opaque_id);
20468            let len = __tmp.len();
20469            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20470        } else {
20471            __tmp.len()
20472        }
20473    }
20474}
20475#[doc = "Delete all mission items at once."]
20476#[doc = ""]
20477#[doc = "ID: 45"]
20478#[derive(Debug, Clone, PartialEq)]
20479#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20480#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20481#[cfg_attr(feature = "ts", derive(TS))]
20482#[cfg_attr(feature = "ts", ts(export))]
20483pub struct MISSION_CLEAR_ALL_DATA {
20484    #[doc = "System ID"]
20485    pub target_system: u8,
20486    #[doc = "Component ID"]
20487    pub target_component: u8,
20488    #[doc = "Mission type."]
20489    #[cfg_attr(feature = "serde", serde(default))]
20490    pub mission_type: MavMissionType,
20491}
20492impl MISSION_CLEAR_ALL_DATA {
20493    pub const ENCODED_LEN: usize = 3usize;
20494    pub const DEFAULT: Self = Self {
20495        target_system: 0_u8,
20496        target_component: 0_u8,
20497        mission_type: MavMissionType::DEFAULT,
20498    };
20499    #[cfg(feature = "arbitrary")]
20500    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20501        use arbitrary::{Arbitrary, Unstructured};
20502        let mut buf = [0u8; 1024];
20503        rng.fill_bytes(&mut buf);
20504        let mut unstructured = Unstructured::new(&buf);
20505        Self::arbitrary(&mut unstructured).unwrap_or_default()
20506    }
20507}
20508impl Default for MISSION_CLEAR_ALL_DATA {
20509    fn default() -> Self {
20510        Self::DEFAULT.clone()
20511    }
20512}
20513impl MessageData for MISSION_CLEAR_ALL_DATA {
20514    type Message = MavMessage;
20515    const ID: u32 = 45u32;
20516    const NAME: &'static str = "MISSION_CLEAR_ALL";
20517    const EXTRA_CRC: u8 = 232u8;
20518    const ENCODED_LEN: usize = 3usize;
20519    fn deser(
20520        _version: MavlinkVersion,
20521        __input: &[u8],
20522    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20523        let avail_len = __input.len();
20524        let mut payload_buf = [0; Self::ENCODED_LEN];
20525        let mut buf = if avail_len < Self::ENCODED_LEN {
20526            payload_buf[0..avail_len].copy_from_slice(__input);
20527            Bytes::new(&payload_buf)
20528        } else {
20529            Bytes::new(__input)
20530        };
20531        let mut __struct = Self::default();
20532        __struct.target_system = buf.get_u8();
20533        __struct.target_component = buf.get_u8();
20534        let tmp = buf.get_u8();
20535        __struct.mission_type =
20536            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20537                enum_type: "MavMissionType",
20538                value: tmp as u32,
20539            })?;
20540        Ok(__struct)
20541    }
20542    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20543        let mut __tmp = BytesMut::new(bytes);
20544        #[allow(clippy::absurd_extreme_comparisons)]
20545        #[allow(unused_comparisons)]
20546        if __tmp.remaining() < Self::ENCODED_LEN {
20547            panic!(
20548                "buffer is too small (need {} bytes, but got {})",
20549                Self::ENCODED_LEN,
20550                __tmp.remaining(),
20551            )
20552        }
20553        __tmp.put_u8(self.target_system);
20554        __tmp.put_u8(self.target_component);
20555        if matches!(version, MavlinkVersion::V2) {
20556            __tmp.put_u8(self.mission_type as u8);
20557            let len = __tmp.len();
20558            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20559        } else {
20560            __tmp.len()
20561        }
20562    }
20563}
20564#[doc = "This message is emitted as response to MISSION_REQUEST_LIST by the MAV and to initiate a write transaction. The GCS can then request the individual mission item based on the knowledge of the total number of waypoints."]
20565#[doc = ""]
20566#[doc = "ID: 44"]
20567#[derive(Debug, Clone, PartialEq)]
20568#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20569#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20570#[cfg_attr(feature = "ts", derive(TS))]
20571#[cfg_attr(feature = "ts", ts(export))]
20572pub struct MISSION_COUNT_DATA {
20573    #[doc = "Number of mission items in the sequence"]
20574    pub count: u16,
20575    #[doc = "System ID"]
20576    pub target_system: u8,
20577    #[doc = "Component ID"]
20578    pub target_component: u8,
20579    #[doc = "Mission type."]
20580    #[cfg_attr(feature = "serde", serde(default))]
20581    pub mission_type: MavMissionType,
20582    #[doc = "Id of current on-vehicle mission, fence, or rally point plan (on download from vehicle).         This field is used when downloading a plan from a vehicle to a GCS.         0 on upload to the vehicle from GCS.         0 if plan ids are not supported.         The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded.         The ids are recalculated by the vehicle when any part of the on-vehicle plan changes (when a new plan is uploaded, the vehicle returns the new id to the GCS in MISSION_ACK)."]
20583    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20584    pub opaque_id: u32,
20585}
20586impl MISSION_COUNT_DATA {
20587    pub const ENCODED_LEN: usize = 9usize;
20588    pub const DEFAULT: Self = Self {
20589        count: 0_u16,
20590        target_system: 0_u8,
20591        target_component: 0_u8,
20592        mission_type: MavMissionType::DEFAULT,
20593        opaque_id: 0_u32,
20594    };
20595    #[cfg(feature = "arbitrary")]
20596    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20597        use arbitrary::{Arbitrary, Unstructured};
20598        let mut buf = [0u8; 1024];
20599        rng.fill_bytes(&mut buf);
20600        let mut unstructured = Unstructured::new(&buf);
20601        Self::arbitrary(&mut unstructured).unwrap_or_default()
20602    }
20603}
20604impl Default for MISSION_COUNT_DATA {
20605    fn default() -> Self {
20606        Self::DEFAULT.clone()
20607    }
20608}
20609impl MessageData for MISSION_COUNT_DATA {
20610    type Message = MavMessage;
20611    const ID: u32 = 44u32;
20612    const NAME: &'static str = "MISSION_COUNT";
20613    const EXTRA_CRC: u8 = 221u8;
20614    const ENCODED_LEN: usize = 9usize;
20615    fn deser(
20616        _version: MavlinkVersion,
20617        __input: &[u8],
20618    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20619        let avail_len = __input.len();
20620        let mut payload_buf = [0; Self::ENCODED_LEN];
20621        let mut buf = if avail_len < Self::ENCODED_LEN {
20622            payload_buf[0..avail_len].copy_from_slice(__input);
20623            Bytes::new(&payload_buf)
20624        } else {
20625            Bytes::new(__input)
20626        };
20627        let mut __struct = Self::default();
20628        __struct.count = buf.get_u16_le();
20629        __struct.target_system = buf.get_u8();
20630        __struct.target_component = buf.get_u8();
20631        let tmp = buf.get_u8();
20632        __struct.mission_type =
20633            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20634                enum_type: "MavMissionType",
20635                value: tmp as u32,
20636            })?;
20637        __struct.opaque_id = buf.get_u32_le();
20638        Ok(__struct)
20639    }
20640    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20641        let mut __tmp = BytesMut::new(bytes);
20642        #[allow(clippy::absurd_extreme_comparisons)]
20643        #[allow(unused_comparisons)]
20644        if __tmp.remaining() < Self::ENCODED_LEN {
20645            panic!(
20646                "buffer is too small (need {} bytes, but got {})",
20647                Self::ENCODED_LEN,
20648                __tmp.remaining(),
20649            )
20650        }
20651        __tmp.put_u16_le(self.count);
20652        __tmp.put_u8(self.target_system);
20653        __tmp.put_u8(self.target_component);
20654        if matches!(version, MavlinkVersion::V2) {
20655            __tmp.put_u8(self.mission_type as u8);
20656            __tmp.put_u32_le(self.opaque_id);
20657            let len = __tmp.len();
20658            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20659        } else {
20660            __tmp.len()
20661        }
20662    }
20663}
20664#[doc = "Message that announces the sequence number of the current target mission item (that the system will fly towards/execute when the mission is running).         This message should be streamed all the time (nominally at 1Hz).         This message should be emitted following a call to MAV_CMD_DO_SET_MISSION_CURRENT or MISSION_SET_CURRENT."]
20665#[doc = ""]
20666#[doc = "ID: 42"]
20667#[derive(Debug, Clone, PartialEq)]
20668#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20669#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20670#[cfg_attr(feature = "ts", derive(TS))]
20671#[cfg_attr(feature = "ts", ts(export))]
20672pub struct MISSION_CURRENT_DATA {
20673    #[doc = "Sequence"]
20674    pub seq: u16,
20675    #[doc = "Total number of mission items on vehicle (on last item, sequence == total). If the autopilot stores its home location as part of the mission this will be excluded from the total. 0: Not supported, UINT16_MAX if no mission is present on the vehicle."]
20676    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20677    pub total: u16,
20678    #[doc = "Mission state machine state. MISSION_STATE_UNKNOWN if state reporting not supported."]
20679    #[cfg_attr(feature = "serde", serde(default))]
20680    pub mission_state: MissionState,
20681    #[doc = "Vehicle is in a mode that can execute mission items or suspended. 0: Unknown, 1: In mission mode, 2: Suspended (not in mission mode)."]
20682    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20683    pub mission_mode: u8,
20684    #[doc = "Id of current on-vehicle mission plan, or 0 if IDs are not supported or there is no mission loaded. GCS can use this to track changes to the mission plan type. The same value is returned on mission upload (in the MISSION_ACK)."]
20685    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20686    pub mission_id: u32,
20687    #[doc = "Id of current on-vehicle fence plan, or 0 if IDs are not supported or there is no fence loaded. GCS can use this to track changes to the fence plan type. The same value is returned on fence upload (in the MISSION_ACK)."]
20688    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20689    pub fence_id: u32,
20690    #[doc = "Id of current on-vehicle rally point plan, or 0 if IDs are not supported or there are no rally points loaded. GCS can use this to track changes to the rally point plan type. The same value is returned on rally point upload (in the MISSION_ACK)."]
20691    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20692    pub rally_points_id: u32,
20693}
20694impl MISSION_CURRENT_DATA {
20695    pub const ENCODED_LEN: usize = 18usize;
20696    pub const DEFAULT: Self = Self {
20697        seq: 0_u16,
20698        total: 0_u16,
20699        mission_state: MissionState::DEFAULT,
20700        mission_mode: 0_u8,
20701        mission_id: 0_u32,
20702        fence_id: 0_u32,
20703        rally_points_id: 0_u32,
20704    };
20705    #[cfg(feature = "arbitrary")]
20706    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20707        use arbitrary::{Arbitrary, Unstructured};
20708        let mut buf = [0u8; 1024];
20709        rng.fill_bytes(&mut buf);
20710        let mut unstructured = Unstructured::new(&buf);
20711        Self::arbitrary(&mut unstructured).unwrap_or_default()
20712    }
20713}
20714impl Default for MISSION_CURRENT_DATA {
20715    fn default() -> Self {
20716        Self::DEFAULT.clone()
20717    }
20718}
20719impl MessageData for MISSION_CURRENT_DATA {
20720    type Message = MavMessage;
20721    const ID: u32 = 42u32;
20722    const NAME: &'static str = "MISSION_CURRENT";
20723    const EXTRA_CRC: u8 = 28u8;
20724    const ENCODED_LEN: usize = 18usize;
20725    fn deser(
20726        _version: MavlinkVersion,
20727        __input: &[u8],
20728    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20729        let avail_len = __input.len();
20730        let mut payload_buf = [0; Self::ENCODED_LEN];
20731        let mut buf = if avail_len < Self::ENCODED_LEN {
20732            payload_buf[0..avail_len].copy_from_slice(__input);
20733            Bytes::new(&payload_buf)
20734        } else {
20735            Bytes::new(__input)
20736        };
20737        let mut __struct = Self::default();
20738        __struct.seq = buf.get_u16_le();
20739        __struct.total = buf.get_u16_le();
20740        let tmp = buf.get_u8();
20741        __struct.mission_state =
20742            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20743                enum_type: "MissionState",
20744                value: tmp as u32,
20745            })?;
20746        __struct.mission_mode = buf.get_u8();
20747        __struct.mission_id = buf.get_u32_le();
20748        __struct.fence_id = buf.get_u32_le();
20749        __struct.rally_points_id = buf.get_u32_le();
20750        Ok(__struct)
20751    }
20752    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20753        let mut __tmp = BytesMut::new(bytes);
20754        #[allow(clippy::absurd_extreme_comparisons)]
20755        #[allow(unused_comparisons)]
20756        if __tmp.remaining() < Self::ENCODED_LEN {
20757            panic!(
20758                "buffer is too small (need {} bytes, but got {})",
20759                Self::ENCODED_LEN,
20760                __tmp.remaining(),
20761            )
20762        }
20763        __tmp.put_u16_le(self.seq);
20764        if matches!(version, MavlinkVersion::V2) {
20765            __tmp.put_u16_le(self.total);
20766            __tmp.put_u8(self.mission_state as u8);
20767            __tmp.put_u8(self.mission_mode);
20768            __tmp.put_u32_le(self.mission_id);
20769            __tmp.put_u32_le(self.fence_id);
20770            __tmp.put_u32_le(self.rally_points_id);
20771            let len = __tmp.len();
20772            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20773        } else {
20774            __tmp.len()
20775        }
20776    }
20777}
20778#[deprecated = " See `MISSION_ITEM_INT` (Deprecated since 2020-06)"]
20779#[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN may be used to indicate an optional/default value (e.g. to use the system's current latitude or yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
20780#[doc = ""]
20781#[doc = "ID: 39"]
20782#[derive(Debug, Clone, PartialEq)]
20783#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20784#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20785#[cfg_attr(feature = "ts", derive(TS))]
20786#[cfg_attr(feature = "ts", ts(export))]
20787pub struct MISSION_ITEM_DATA {
20788    #[doc = "PARAM1, see MAV_CMD enum"]
20789    pub param1: f32,
20790    #[doc = "PARAM2, see MAV_CMD enum"]
20791    pub param2: f32,
20792    #[doc = "PARAM3, see MAV_CMD enum"]
20793    pub param3: f32,
20794    #[doc = "PARAM4, see MAV_CMD enum"]
20795    pub param4: f32,
20796    #[doc = "PARAM5 / local: X coordinate, global: latitude"]
20797    pub x: f32,
20798    #[doc = "PARAM6 / local: Y coordinate, global: longitude"]
20799    pub y: f32,
20800    #[doc = "PARAM7 / local: Z coordinate, global: altitude (relative or absolute, depending on frame)."]
20801    pub z: f32,
20802    #[doc = "Sequence"]
20803    pub seq: u16,
20804    #[doc = "The scheduled action for the waypoint."]
20805    pub command: MavCmd,
20806    #[doc = "System ID"]
20807    pub target_system: u8,
20808    #[doc = "Component ID"]
20809    pub target_component: u8,
20810    #[doc = "The coordinate system of the waypoint."]
20811    pub frame: MavFrame,
20812    #[doc = "false:0, true:1"]
20813    pub current: u8,
20814    #[doc = "Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes."]
20815    pub autocontinue: u8,
20816    #[doc = "Mission type."]
20817    #[cfg_attr(feature = "serde", serde(default))]
20818    pub mission_type: MavMissionType,
20819}
20820impl MISSION_ITEM_DATA {
20821    pub const ENCODED_LEN: usize = 38usize;
20822    pub const DEFAULT: Self = Self {
20823        param1: 0.0_f32,
20824        param2: 0.0_f32,
20825        param3: 0.0_f32,
20826        param4: 0.0_f32,
20827        x: 0.0_f32,
20828        y: 0.0_f32,
20829        z: 0.0_f32,
20830        seq: 0_u16,
20831        command: MavCmd::DEFAULT,
20832        target_system: 0_u8,
20833        target_component: 0_u8,
20834        frame: MavFrame::DEFAULT,
20835        current: 0_u8,
20836        autocontinue: 0_u8,
20837        mission_type: MavMissionType::DEFAULT,
20838    };
20839    #[cfg(feature = "arbitrary")]
20840    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20841        use arbitrary::{Arbitrary, Unstructured};
20842        let mut buf = [0u8; 1024];
20843        rng.fill_bytes(&mut buf);
20844        let mut unstructured = Unstructured::new(&buf);
20845        Self::arbitrary(&mut unstructured).unwrap_or_default()
20846    }
20847}
20848impl Default for MISSION_ITEM_DATA {
20849    fn default() -> Self {
20850        Self::DEFAULT.clone()
20851    }
20852}
20853impl MessageData for MISSION_ITEM_DATA {
20854    type Message = MavMessage;
20855    const ID: u32 = 39u32;
20856    const NAME: &'static str = "MISSION_ITEM";
20857    const EXTRA_CRC: u8 = 254u8;
20858    const ENCODED_LEN: usize = 38usize;
20859    fn deser(
20860        _version: MavlinkVersion,
20861        __input: &[u8],
20862    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20863        let avail_len = __input.len();
20864        let mut payload_buf = [0; Self::ENCODED_LEN];
20865        let mut buf = if avail_len < Self::ENCODED_LEN {
20866            payload_buf[0..avail_len].copy_from_slice(__input);
20867            Bytes::new(&payload_buf)
20868        } else {
20869            Bytes::new(__input)
20870        };
20871        let mut __struct = Self::default();
20872        __struct.param1 = buf.get_f32_le();
20873        __struct.param2 = buf.get_f32_le();
20874        __struct.param3 = buf.get_f32_le();
20875        __struct.param4 = buf.get_f32_le();
20876        __struct.x = buf.get_f32_le();
20877        __struct.y = buf.get_f32_le();
20878        __struct.z = buf.get_f32_le();
20879        __struct.seq = buf.get_u16_le();
20880        let tmp = buf.get_u16_le();
20881        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
20882            ::mavlink_core::error::ParserError::InvalidEnum {
20883                enum_type: "MavCmd",
20884                value: tmp as u32,
20885            },
20886        )?;
20887        __struct.target_system = buf.get_u8();
20888        __struct.target_component = buf.get_u8();
20889        let tmp = buf.get_u8();
20890        __struct.frame =
20891            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20892                enum_type: "MavFrame",
20893                value: tmp as u32,
20894            })?;
20895        __struct.current = buf.get_u8();
20896        __struct.autocontinue = buf.get_u8();
20897        let tmp = buf.get_u8();
20898        __struct.mission_type =
20899            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20900                enum_type: "MavMissionType",
20901                value: tmp as u32,
20902            })?;
20903        Ok(__struct)
20904    }
20905    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20906        let mut __tmp = BytesMut::new(bytes);
20907        #[allow(clippy::absurd_extreme_comparisons)]
20908        #[allow(unused_comparisons)]
20909        if __tmp.remaining() < Self::ENCODED_LEN {
20910            panic!(
20911                "buffer is too small (need {} bytes, but got {})",
20912                Self::ENCODED_LEN,
20913                __tmp.remaining(),
20914            )
20915        }
20916        __tmp.put_f32_le(self.param1);
20917        __tmp.put_f32_le(self.param2);
20918        __tmp.put_f32_le(self.param3);
20919        __tmp.put_f32_le(self.param4);
20920        __tmp.put_f32_le(self.x);
20921        __tmp.put_f32_le(self.y);
20922        __tmp.put_f32_le(self.z);
20923        __tmp.put_u16_le(self.seq);
20924        __tmp.put_u16_le(self.command as u16);
20925        __tmp.put_u8(self.target_system);
20926        __tmp.put_u8(self.target_component);
20927        __tmp.put_u8(self.frame as u8);
20928        __tmp.put_u8(self.current);
20929        __tmp.put_u8(self.autocontinue);
20930        if matches!(version, MavlinkVersion::V2) {
20931            __tmp.put_u8(self.mission_type as u8);
20932            let len = __tmp.len();
20933            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20934        } else {
20935            __tmp.len()
20936        }
20937    }
20938}
20939#[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
20940#[doc = ""]
20941#[doc = "ID: 73"]
20942#[derive(Debug, Clone, PartialEq)]
20943#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20944#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20945#[cfg_attr(feature = "ts", derive(TS))]
20946#[cfg_attr(feature = "ts", ts(export))]
20947pub struct MISSION_ITEM_INT_DATA {
20948    #[doc = "PARAM1, see MAV_CMD enum"]
20949    pub param1: f32,
20950    #[doc = "PARAM2, see MAV_CMD enum"]
20951    pub param2: f32,
20952    #[doc = "PARAM3, see MAV_CMD enum"]
20953    pub param3: f32,
20954    #[doc = "PARAM4, see MAV_CMD enum"]
20955    pub param4: f32,
20956    #[doc = "PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7"]
20957    pub x: i32,
20958    #[doc = "PARAM6 / y position: local: x position in meters * 1e4, global: longitude in degrees *10^7"]
20959    pub y: i32,
20960    #[doc = "PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame."]
20961    pub z: f32,
20962    #[doc = "Waypoint ID (sequence number). Starts at zero. Increases monotonically for each waypoint, no gaps in the sequence (0,1,2,3,4)."]
20963    pub seq: u16,
20964    #[doc = "The scheduled action for the waypoint."]
20965    pub command: MavCmd,
20966    #[doc = "System ID"]
20967    pub target_system: u8,
20968    #[doc = "Component ID"]
20969    pub target_component: u8,
20970    #[doc = "The coordinate system of the waypoint."]
20971    pub frame: MavFrame,
20972    #[doc = "false:0, true:1"]
20973    pub current: u8,
20974    #[doc = "Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes."]
20975    pub autocontinue: u8,
20976    #[doc = "Mission type."]
20977    #[cfg_attr(feature = "serde", serde(default))]
20978    pub mission_type: MavMissionType,
20979}
20980impl MISSION_ITEM_INT_DATA {
20981    pub const ENCODED_LEN: usize = 38usize;
20982    pub const DEFAULT: Self = Self {
20983        param1: 0.0_f32,
20984        param2: 0.0_f32,
20985        param3: 0.0_f32,
20986        param4: 0.0_f32,
20987        x: 0_i32,
20988        y: 0_i32,
20989        z: 0.0_f32,
20990        seq: 0_u16,
20991        command: MavCmd::DEFAULT,
20992        target_system: 0_u8,
20993        target_component: 0_u8,
20994        frame: MavFrame::DEFAULT,
20995        current: 0_u8,
20996        autocontinue: 0_u8,
20997        mission_type: MavMissionType::DEFAULT,
20998    };
20999    #[cfg(feature = "arbitrary")]
21000    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21001        use arbitrary::{Arbitrary, Unstructured};
21002        let mut buf = [0u8; 1024];
21003        rng.fill_bytes(&mut buf);
21004        let mut unstructured = Unstructured::new(&buf);
21005        Self::arbitrary(&mut unstructured).unwrap_or_default()
21006    }
21007}
21008impl Default for MISSION_ITEM_INT_DATA {
21009    fn default() -> Self {
21010        Self::DEFAULT.clone()
21011    }
21012}
21013impl MessageData for MISSION_ITEM_INT_DATA {
21014    type Message = MavMessage;
21015    const ID: u32 = 73u32;
21016    const NAME: &'static str = "MISSION_ITEM_INT";
21017    const EXTRA_CRC: u8 = 38u8;
21018    const ENCODED_LEN: usize = 38usize;
21019    fn deser(
21020        _version: MavlinkVersion,
21021        __input: &[u8],
21022    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21023        let avail_len = __input.len();
21024        let mut payload_buf = [0; Self::ENCODED_LEN];
21025        let mut buf = if avail_len < Self::ENCODED_LEN {
21026            payload_buf[0..avail_len].copy_from_slice(__input);
21027            Bytes::new(&payload_buf)
21028        } else {
21029            Bytes::new(__input)
21030        };
21031        let mut __struct = Self::default();
21032        __struct.param1 = buf.get_f32_le();
21033        __struct.param2 = buf.get_f32_le();
21034        __struct.param3 = buf.get_f32_le();
21035        __struct.param4 = buf.get_f32_le();
21036        __struct.x = buf.get_i32_le();
21037        __struct.y = buf.get_i32_le();
21038        __struct.z = buf.get_f32_le();
21039        __struct.seq = buf.get_u16_le();
21040        let tmp = buf.get_u16_le();
21041        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
21042            ::mavlink_core::error::ParserError::InvalidEnum {
21043                enum_type: "MavCmd",
21044                value: tmp as u32,
21045            },
21046        )?;
21047        __struct.target_system = buf.get_u8();
21048        __struct.target_component = buf.get_u8();
21049        let tmp = buf.get_u8();
21050        __struct.frame =
21051            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21052                enum_type: "MavFrame",
21053                value: tmp as u32,
21054            })?;
21055        __struct.current = buf.get_u8();
21056        __struct.autocontinue = buf.get_u8();
21057        let tmp = buf.get_u8();
21058        __struct.mission_type =
21059            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21060                enum_type: "MavMissionType",
21061                value: tmp as u32,
21062            })?;
21063        Ok(__struct)
21064    }
21065    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21066        let mut __tmp = BytesMut::new(bytes);
21067        #[allow(clippy::absurd_extreme_comparisons)]
21068        #[allow(unused_comparisons)]
21069        if __tmp.remaining() < Self::ENCODED_LEN {
21070            panic!(
21071                "buffer is too small (need {} bytes, but got {})",
21072                Self::ENCODED_LEN,
21073                __tmp.remaining(),
21074            )
21075        }
21076        __tmp.put_f32_le(self.param1);
21077        __tmp.put_f32_le(self.param2);
21078        __tmp.put_f32_le(self.param3);
21079        __tmp.put_f32_le(self.param4);
21080        __tmp.put_i32_le(self.x);
21081        __tmp.put_i32_le(self.y);
21082        __tmp.put_f32_le(self.z);
21083        __tmp.put_u16_le(self.seq);
21084        __tmp.put_u16_le(self.command as u16);
21085        __tmp.put_u8(self.target_system);
21086        __tmp.put_u8(self.target_component);
21087        __tmp.put_u8(self.frame as u8);
21088        __tmp.put_u8(self.current);
21089        __tmp.put_u8(self.autocontinue);
21090        if matches!(version, MavlinkVersion::V2) {
21091            __tmp.put_u8(self.mission_type as u8);
21092            let len = __tmp.len();
21093            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21094        } else {
21095            __tmp.len()
21096        }
21097    }
21098}
21099#[doc = "A certain mission item has been reached. The system will either hold this position (or circle on the orbit) or (if the autocontinue on the WP was set) continue to the next waypoint."]
21100#[doc = ""]
21101#[doc = "ID: 46"]
21102#[derive(Debug, Clone, PartialEq)]
21103#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21104#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21105#[cfg_attr(feature = "ts", derive(TS))]
21106#[cfg_attr(feature = "ts", ts(export))]
21107pub struct MISSION_ITEM_REACHED_DATA {
21108    #[doc = "Sequence"]
21109    pub seq: u16,
21110}
21111impl MISSION_ITEM_REACHED_DATA {
21112    pub const ENCODED_LEN: usize = 2usize;
21113    pub const DEFAULT: Self = Self { seq: 0_u16 };
21114    #[cfg(feature = "arbitrary")]
21115    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21116        use arbitrary::{Arbitrary, Unstructured};
21117        let mut buf = [0u8; 1024];
21118        rng.fill_bytes(&mut buf);
21119        let mut unstructured = Unstructured::new(&buf);
21120        Self::arbitrary(&mut unstructured).unwrap_or_default()
21121    }
21122}
21123impl Default for MISSION_ITEM_REACHED_DATA {
21124    fn default() -> Self {
21125        Self::DEFAULT.clone()
21126    }
21127}
21128impl MessageData for MISSION_ITEM_REACHED_DATA {
21129    type Message = MavMessage;
21130    const ID: u32 = 46u32;
21131    const NAME: &'static str = "MISSION_ITEM_REACHED";
21132    const EXTRA_CRC: u8 = 11u8;
21133    const ENCODED_LEN: usize = 2usize;
21134    fn deser(
21135        _version: MavlinkVersion,
21136        __input: &[u8],
21137    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21138        let avail_len = __input.len();
21139        let mut payload_buf = [0; Self::ENCODED_LEN];
21140        let mut buf = if avail_len < Self::ENCODED_LEN {
21141            payload_buf[0..avail_len].copy_from_slice(__input);
21142            Bytes::new(&payload_buf)
21143        } else {
21144            Bytes::new(__input)
21145        };
21146        let mut __struct = Self::default();
21147        __struct.seq = buf.get_u16_le();
21148        Ok(__struct)
21149    }
21150    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21151        let mut __tmp = BytesMut::new(bytes);
21152        #[allow(clippy::absurd_extreme_comparisons)]
21153        #[allow(unused_comparisons)]
21154        if __tmp.remaining() < Self::ENCODED_LEN {
21155            panic!(
21156                "buffer is too small (need {} bytes, but got {})",
21157                Self::ENCODED_LEN,
21158                __tmp.remaining(),
21159            )
21160        }
21161        __tmp.put_u16_le(self.seq);
21162        if matches!(version, MavlinkVersion::V2) {
21163            let len = __tmp.len();
21164            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21165        } else {
21166            __tmp.len()
21167        }
21168    }
21169}
21170#[deprecated = "A system that gets this request should respond with MISSION_ITEM_INT (as though MISSION_REQUEST_INT was received). See `MISSION_REQUEST_INT` (Deprecated since 2020-06)"]
21171#[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM message. <https://mavlink.io/en/services/mission.html>."]
21172#[doc = ""]
21173#[doc = "ID: 40"]
21174#[derive(Debug, Clone, PartialEq)]
21175#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21176#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21177#[cfg_attr(feature = "ts", derive(TS))]
21178#[cfg_attr(feature = "ts", ts(export))]
21179pub struct MISSION_REQUEST_DATA {
21180    #[doc = "Sequence"]
21181    pub seq: u16,
21182    #[doc = "System ID"]
21183    pub target_system: u8,
21184    #[doc = "Component ID"]
21185    pub target_component: u8,
21186    #[doc = "Mission type."]
21187    #[cfg_attr(feature = "serde", serde(default))]
21188    pub mission_type: MavMissionType,
21189}
21190impl MISSION_REQUEST_DATA {
21191    pub const ENCODED_LEN: usize = 5usize;
21192    pub const DEFAULT: Self = Self {
21193        seq: 0_u16,
21194        target_system: 0_u8,
21195        target_component: 0_u8,
21196        mission_type: MavMissionType::DEFAULT,
21197    };
21198    #[cfg(feature = "arbitrary")]
21199    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21200        use arbitrary::{Arbitrary, Unstructured};
21201        let mut buf = [0u8; 1024];
21202        rng.fill_bytes(&mut buf);
21203        let mut unstructured = Unstructured::new(&buf);
21204        Self::arbitrary(&mut unstructured).unwrap_or_default()
21205    }
21206}
21207impl Default for MISSION_REQUEST_DATA {
21208    fn default() -> Self {
21209        Self::DEFAULT.clone()
21210    }
21211}
21212impl MessageData for MISSION_REQUEST_DATA {
21213    type Message = MavMessage;
21214    const ID: u32 = 40u32;
21215    const NAME: &'static str = "MISSION_REQUEST";
21216    const EXTRA_CRC: u8 = 230u8;
21217    const ENCODED_LEN: usize = 5usize;
21218    fn deser(
21219        _version: MavlinkVersion,
21220        __input: &[u8],
21221    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21222        let avail_len = __input.len();
21223        let mut payload_buf = [0; Self::ENCODED_LEN];
21224        let mut buf = if avail_len < Self::ENCODED_LEN {
21225            payload_buf[0..avail_len].copy_from_slice(__input);
21226            Bytes::new(&payload_buf)
21227        } else {
21228            Bytes::new(__input)
21229        };
21230        let mut __struct = Self::default();
21231        __struct.seq = buf.get_u16_le();
21232        __struct.target_system = buf.get_u8();
21233        __struct.target_component = buf.get_u8();
21234        let tmp = buf.get_u8();
21235        __struct.mission_type =
21236            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21237                enum_type: "MavMissionType",
21238                value: tmp as u32,
21239            })?;
21240        Ok(__struct)
21241    }
21242    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21243        let mut __tmp = BytesMut::new(bytes);
21244        #[allow(clippy::absurd_extreme_comparisons)]
21245        #[allow(unused_comparisons)]
21246        if __tmp.remaining() < Self::ENCODED_LEN {
21247            panic!(
21248                "buffer is too small (need {} bytes, but got {})",
21249                Self::ENCODED_LEN,
21250                __tmp.remaining(),
21251            )
21252        }
21253        __tmp.put_u16_le(self.seq);
21254        __tmp.put_u8(self.target_system);
21255        __tmp.put_u8(self.target_component);
21256        if matches!(version, MavlinkVersion::V2) {
21257            __tmp.put_u8(self.mission_type as u8);
21258            let len = __tmp.len();
21259            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21260        } else {
21261            __tmp.len()
21262        }
21263    }
21264}
21265#[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM_INT message. <https://mavlink.io/en/services/mission.html>."]
21266#[doc = ""]
21267#[doc = "ID: 51"]
21268#[derive(Debug, Clone, PartialEq)]
21269#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21270#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21271#[cfg_attr(feature = "ts", derive(TS))]
21272#[cfg_attr(feature = "ts", ts(export))]
21273pub struct MISSION_REQUEST_INT_DATA {
21274    #[doc = "Sequence"]
21275    pub seq: u16,
21276    #[doc = "System ID"]
21277    pub target_system: u8,
21278    #[doc = "Component ID"]
21279    pub target_component: u8,
21280    #[doc = "Mission type."]
21281    #[cfg_attr(feature = "serde", serde(default))]
21282    pub mission_type: MavMissionType,
21283}
21284impl MISSION_REQUEST_INT_DATA {
21285    pub const ENCODED_LEN: usize = 5usize;
21286    pub const DEFAULT: Self = Self {
21287        seq: 0_u16,
21288        target_system: 0_u8,
21289        target_component: 0_u8,
21290        mission_type: MavMissionType::DEFAULT,
21291    };
21292    #[cfg(feature = "arbitrary")]
21293    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21294        use arbitrary::{Arbitrary, Unstructured};
21295        let mut buf = [0u8; 1024];
21296        rng.fill_bytes(&mut buf);
21297        let mut unstructured = Unstructured::new(&buf);
21298        Self::arbitrary(&mut unstructured).unwrap_or_default()
21299    }
21300}
21301impl Default for MISSION_REQUEST_INT_DATA {
21302    fn default() -> Self {
21303        Self::DEFAULT.clone()
21304    }
21305}
21306impl MessageData for MISSION_REQUEST_INT_DATA {
21307    type Message = MavMessage;
21308    const ID: u32 = 51u32;
21309    const NAME: &'static str = "MISSION_REQUEST_INT";
21310    const EXTRA_CRC: u8 = 196u8;
21311    const ENCODED_LEN: usize = 5usize;
21312    fn deser(
21313        _version: MavlinkVersion,
21314        __input: &[u8],
21315    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21316        let avail_len = __input.len();
21317        let mut payload_buf = [0; Self::ENCODED_LEN];
21318        let mut buf = if avail_len < Self::ENCODED_LEN {
21319            payload_buf[0..avail_len].copy_from_slice(__input);
21320            Bytes::new(&payload_buf)
21321        } else {
21322            Bytes::new(__input)
21323        };
21324        let mut __struct = Self::default();
21325        __struct.seq = buf.get_u16_le();
21326        __struct.target_system = buf.get_u8();
21327        __struct.target_component = buf.get_u8();
21328        let tmp = buf.get_u8();
21329        __struct.mission_type =
21330            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21331                enum_type: "MavMissionType",
21332                value: tmp as u32,
21333            })?;
21334        Ok(__struct)
21335    }
21336    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21337        let mut __tmp = BytesMut::new(bytes);
21338        #[allow(clippy::absurd_extreme_comparisons)]
21339        #[allow(unused_comparisons)]
21340        if __tmp.remaining() < Self::ENCODED_LEN {
21341            panic!(
21342                "buffer is too small (need {} bytes, but got {})",
21343                Self::ENCODED_LEN,
21344                __tmp.remaining(),
21345            )
21346        }
21347        __tmp.put_u16_le(self.seq);
21348        __tmp.put_u8(self.target_system);
21349        __tmp.put_u8(self.target_component);
21350        if matches!(version, MavlinkVersion::V2) {
21351            __tmp.put_u8(self.mission_type as u8);
21352            let len = __tmp.len();
21353            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21354        } else {
21355            __tmp.len()
21356        }
21357    }
21358}
21359#[doc = "Request the overall list of mission items from the system/component."]
21360#[doc = ""]
21361#[doc = "ID: 43"]
21362#[derive(Debug, Clone, PartialEq)]
21363#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21364#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21365#[cfg_attr(feature = "ts", derive(TS))]
21366#[cfg_attr(feature = "ts", ts(export))]
21367pub struct MISSION_REQUEST_LIST_DATA {
21368    #[doc = "System ID"]
21369    pub target_system: u8,
21370    #[doc = "Component ID"]
21371    pub target_component: u8,
21372    #[doc = "Mission type."]
21373    #[cfg_attr(feature = "serde", serde(default))]
21374    pub mission_type: MavMissionType,
21375}
21376impl MISSION_REQUEST_LIST_DATA {
21377    pub const ENCODED_LEN: usize = 3usize;
21378    pub const DEFAULT: Self = Self {
21379        target_system: 0_u8,
21380        target_component: 0_u8,
21381        mission_type: MavMissionType::DEFAULT,
21382    };
21383    #[cfg(feature = "arbitrary")]
21384    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21385        use arbitrary::{Arbitrary, Unstructured};
21386        let mut buf = [0u8; 1024];
21387        rng.fill_bytes(&mut buf);
21388        let mut unstructured = Unstructured::new(&buf);
21389        Self::arbitrary(&mut unstructured).unwrap_or_default()
21390    }
21391}
21392impl Default for MISSION_REQUEST_LIST_DATA {
21393    fn default() -> Self {
21394        Self::DEFAULT.clone()
21395    }
21396}
21397impl MessageData for MISSION_REQUEST_LIST_DATA {
21398    type Message = MavMessage;
21399    const ID: u32 = 43u32;
21400    const NAME: &'static str = "MISSION_REQUEST_LIST";
21401    const EXTRA_CRC: u8 = 132u8;
21402    const ENCODED_LEN: usize = 3usize;
21403    fn deser(
21404        _version: MavlinkVersion,
21405        __input: &[u8],
21406    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21407        let avail_len = __input.len();
21408        let mut payload_buf = [0; Self::ENCODED_LEN];
21409        let mut buf = if avail_len < Self::ENCODED_LEN {
21410            payload_buf[0..avail_len].copy_from_slice(__input);
21411            Bytes::new(&payload_buf)
21412        } else {
21413            Bytes::new(__input)
21414        };
21415        let mut __struct = Self::default();
21416        __struct.target_system = buf.get_u8();
21417        __struct.target_component = buf.get_u8();
21418        let tmp = buf.get_u8();
21419        __struct.mission_type =
21420            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21421                enum_type: "MavMissionType",
21422                value: tmp as u32,
21423            })?;
21424        Ok(__struct)
21425    }
21426    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21427        let mut __tmp = BytesMut::new(bytes);
21428        #[allow(clippy::absurd_extreme_comparisons)]
21429        #[allow(unused_comparisons)]
21430        if __tmp.remaining() < Self::ENCODED_LEN {
21431            panic!(
21432                "buffer is too small (need {} bytes, but got {})",
21433                Self::ENCODED_LEN,
21434                __tmp.remaining(),
21435            )
21436        }
21437        __tmp.put_u8(self.target_system);
21438        __tmp.put_u8(self.target_component);
21439        if matches!(version, MavlinkVersion::V2) {
21440            __tmp.put_u8(self.mission_type as u8);
21441            let len = __tmp.len();
21442            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21443        } else {
21444            __tmp.len()
21445        }
21446    }
21447}
21448#[doc = "Request a partial list of mission items from the system/component. <https://mavlink.io/en/services/mission.html>. If start and end index are the same, just send one waypoint."]
21449#[doc = ""]
21450#[doc = "ID: 37"]
21451#[derive(Debug, Clone, PartialEq)]
21452#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21453#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21454#[cfg_attr(feature = "ts", derive(TS))]
21455#[cfg_attr(feature = "ts", ts(export))]
21456pub struct MISSION_REQUEST_PARTIAL_LIST_DATA {
21457    #[doc = "Start index"]
21458    pub start_index: i16,
21459    #[doc = "End index, -1 by default (-1: send list to end). Else a valid index of the list"]
21460    pub end_index: i16,
21461    #[doc = "System ID"]
21462    pub target_system: u8,
21463    #[doc = "Component ID"]
21464    pub target_component: u8,
21465    #[doc = "Mission type."]
21466    #[cfg_attr(feature = "serde", serde(default))]
21467    pub mission_type: MavMissionType,
21468}
21469impl MISSION_REQUEST_PARTIAL_LIST_DATA {
21470    pub const ENCODED_LEN: usize = 7usize;
21471    pub const DEFAULT: Self = Self {
21472        start_index: 0_i16,
21473        end_index: 0_i16,
21474        target_system: 0_u8,
21475        target_component: 0_u8,
21476        mission_type: MavMissionType::DEFAULT,
21477    };
21478    #[cfg(feature = "arbitrary")]
21479    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21480        use arbitrary::{Arbitrary, Unstructured};
21481        let mut buf = [0u8; 1024];
21482        rng.fill_bytes(&mut buf);
21483        let mut unstructured = Unstructured::new(&buf);
21484        Self::arbitrary(&mut unstructured).unwrap_or_default()
21485    }
21486}
21487impl Default for MISSION_REQUEST_PARTIAL_LIST_DATA {
21488    fn default() -> Self {
21489        Self::DEFAULT.clone()
21490    }
21491}
21492impl MessageData for MISSION_REQUEST_PARTIAL_LIST_DATA {
21493    type Message = MavMessage;
21494    const ID: u32 = 37u32;
21495    const NAME: &'static str = "MISSION_REQUEST_PARTIAL_LIST";
21496    const EXTRA_CRC: u8 = 212u8;
21497    const ENCODED_LEN: usize = 7usize;
21498    fn deser(
21499        _version: MavlinkVersion,
21500        __input: &[u8],
21501    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21502        let avail_len = __input.len();
21503        let mut payload_buf = [0; Self::ENCODED_LEN];
21504        let mut buf = if avail_len < Self::ENCODED_LEN {
21505            payload_buf[0..avail_len].copy_from_slice(__input);
21506            Bytes::new(&payload_buf)
21507        } else {
21508            Bytes::new(__input)
21509        };
21510        let mut __struct = Self::default();
21511        __struct.start_index = buf.get_i16_le();
21512        __struct.end_index = buf.get_i16_le();
21513        __struct.target_system = buf.get_u8();
21514        __struct.target_component = buf.get_u8();
21515        let tmp = buf.get_u8();
21516        __struct.mission_type =
21517            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21518                enum_type: "MavMissionType",
21519                value: tmp as u32,
21520            })?;
21521        Ok(__struct)
21522    }
21523    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21524        let mut __tmp = BytesMut::new(bytes);
21525        #[allow(clippy::absurd_extreme_comparisons)]
21526        #[allow(unused_comparisons)]
21527        if __tmp.remaining() < Self::ENCODED_LEN {
21528            panic!(
21529                "buffer is too small (need {} bytes, but got {})",
21530                Self::ENCODED_LEN,
21531                __tmp.remaining(),
21532            )
21533        }
21534        __tmp.put_i16_le(self.start_index);
21535        __tmp.put_i16_le(self.end_index);
21536        __tmp.put_u8(self.target_system);
21537        __tmp.put_u8(self.target_component);
21538        if matches!(version, MavlinkVersion::V2) {
21539            __tmp.put_u8(self.mission_type as u8);
21540            let len = __tmp.len();
21541            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21542        } else {
21543            __tmp.len()
21544        }
21545    }
21546}
21547#[deprecated = " See `MAV_CMD_DO_SET_MISSION_CURRENT` (Deprecated since 2022-08)"]
21548#[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).         If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items.         Note that mission jump repeat counters are not reset (see MAV_CMD_DO_JUMP param2).          This message may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.         If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.         If the system is not in mission mode this message must not trigger a switch to mission mode."]
21549#[doc = ""]
21550#[doc = "ID: 41"]
21551#[derive(Debug, Clone, PartialEq)]
21552#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21553#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21554#[cfg_attr(feature = "ts", derive(TS))]
21555#[cfg_attr(feature = "ts", ts(export))]
21556pub struct MISSION_SET_CURRENT_DATA {
21557    #[doc = "Sequence"]
21558    pub seq: u16,
21559    #[doc = "System ID"]
21560    pub target_system: u8,
21561    #[doc = "Component ID"]
21562    pub target_component: u8,
21563}
21564impl MISSION_SET_CURRENT_DATA {
21565    pub const ENCODED_LEN: usize = 4usize;
21566    pub const DEFAULT: Self = Self {
21567        seq: 0_u16,
21568        target_system: 0_u8,
21569        target_component: 0_u8,
21570    };
21571    #[cfg(feature = "arbitrary")]
21572    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21573        use arbitrary::{Arbitrary, Unstructured};
21574        let mut buf = [0u8; 1024];
21575        rng.fill_bytes(&mut buf);
21576        let mut unstructured = Unstructured::new(&buf);
21577        Self::arbitrary(&mut unstructured).unwrap_or_default()
21578    }
21579}
21580impl Default for MISSION_SET_CURRENT_DATA {
21581    fn default() -> Self {
21582        Self::DEFAULT.clone()
21583    }
21584}
21585impl MessageData for MISSION_SET_CURRENT_DATA {
21586    type Message = MavMessage;
21587    const ID: u32 = 41u32;
21588    const NAME: &'static str = "MISSION_SET_CURRENT";
21589    const EXTRA_CRC: u8 = 28u8;
21590    const ENCODED_LEN: usize = 4usize;
21591    fn deser(
21592        _version: MavlinkVersion,
21593        __input: &[u8],
21594    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21595        let avail_len = __input.len();
21596        let mut payload_buf = [0; Self::ENCODED_LEN];
21597        let mut buf = if avail_len < Self::ENCODED_LEN {
21598            payload_buf[0..avail_len].copy_from_slice(__input);
21599            Bytes::new(&payload_buf)
21600        } else {
21601            Bytes::new(__input)
21602        };
21603        let mut __struct = Self::default();
21604        __struct.seq = buf.get_u16_le();
21605        __struct.target_system = buf.get_u8();
21606        __struct.target_component = buf.get_u8();
21607        Ok(__struct)
21608    }
21609    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21610        let mut __tmp = BytesMut::new(bytes);
21611        #[allow(clippy::absurd_extreme_comparisons)]
21612        #[allow(unused_comparisons)]
21613        if __tmp.remaining() < Self::ENCODED_LEN {
21614            panic!(
21615                "buffer is too small (need {} bytes, but got {})",
21616                Self::ENCODED_LEN,
21617                __tmp.remaining(),
21618            )
21619        }
21620        __tmp.put_u16_le(self.seq);
21621        __tmp.put_u8(self.target_system);
21622        __tmp.put_u8(self.target_component);
21623        if matches!(version, MavlinkVersion::V2) {
21624            let len = __tmp.len();
21625            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21626        } else {
21627            __tmp.len()
21628        }
21629    }
21630}
21631#[doc = "This message is sent to the MAV to write a partial list. If start index == end index, only one item will be transmitted / updated. If the start index is NOT 0 and above the current list size, this request should be REJECTED!."]
21632#[doc = ""]
21633#[doc = "ID: 38"]
21634#[derive(Debug, Clone, PartialEq)]
21635#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21636#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21637#[cfg_attr(feature = "ts", derive(TS))]
21638#[cfg_attr(feature = "ts", ts(export))]
21639pub struct MISSION_WRITE_PARTIAL_LIST_DATA {
21640    #[doc = "Start index. Must be smaller / equal to the largest index of the current onboard list."]
21641    pub start_index: i16,
21642    #[doc = "End index, equal or greater than start index."]
21643    pub end_index: i16,
21644    #[doc = "System ID"]
21645    pub target_system: u8,
21646    #[doc = "Component ID"]
21647    pub target_component: u8,
21648    #[doc = "Mission type."]
21649    #[cfg_attr(feature = "serde", serde(default))]
21650    pub mission_type: MavMissionType,
21651}
21652impl MISSION_WRITE_PARTIAL_LIST_DATA {
21653    pub const ENCODED_LEN: usize = 7usize;
21654    pub const DEFAULT: Self = Self {
21655        start_index: 0_i16,
21656        end_index: 0_i16,
21657        target_system: 0_u8,
21658        target_component: 0_u8,
21659        mission_type: MavMissionType::DEFAULT,
21660    };
21661    #[cfg(feature = "arbitrary")]
21662    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21663        use arbitrary::{Arbitrary, Unstructured};
21664        let mut buf = [0u8; 1024];
21665        rng.fill_bytes(&mut buf);
21666        let mut unstructured = Unstructured::new(&buf);
21667        Self::arbitrary(&mut unstructured).unwrap_or_default()
21668    }
21669}
21670impl Default for MISSION_WRITE_PARTIAL_LIST_DATA {
21671    fn default() -> Self {
21672        Self::DEFAULT.clone()
21673    }
21674}
21675impl MessageData for MISSION_WRITE_PARTIAL_LIST_DATA {
21676    type Message = MavMessage;
21677    const ID: u32 = 38u32;
21678    const NAME: &'static str = "MISSION_WRITE_PARTIAL_LIST";
21679    const EXTRA_CRC: u8 = 9u8;
21680    const ENCODED_LEN: usize = 7usize;
21681    fn deser(
21682        _version: MavlinkVersion,
21683        __input: &[u8],
21684    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21685        let avail_len = __input.len();
21686        let mut payload_buf = [0; Self::ENCODED_LEN];
21687        let mut buf = if avail_len < Self::ENCODED_LEN {
21688            payload_buf[0..avail_len].copy_from_slice(__input);
21689            Bytes::new(&payload_buf)
21690        } else {
21691            Bytes::new(__input)
21692        };
21693        let mut __struct = Self::default();
21694        __struct.start_index = buf.get_i16_le();
21695        __struct.end_index = buf.get_i16_le();
21696        __struct.target_system = buf.get_u8();
21697        __struct.target_component = buf.get_u8();
21698        let tmp = buf.get_u8();
21699        __struct.mission_type =
21700            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21701                enum_type: "MavMissionType",
21702                value: tmp as u32,
21703            })?;
21704        Ok(__struct)
21705    }
21706    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21707        let mut __tmp = BytesMut::new(bytes);
21708        #[allow(clippy::absurd_extreme_comparisons)]
21709        #[allow(unused_comparisons)]
21710        if __tmp.remaining() < Self::ENCODED_LEN {
21711            panic!(
21712                "buffer is too small (need {} bytes, but got {})",
21713                Self::ENCODED_LEN,
21714                __tmp.remaining(),
21715            )
21716        }
21717        __tmp.put_i16_le(self.start_index);
21718        __tmp.put_i16_le(self.end_index);
21719        __tmp.put_u8(self.target_system);
21720        __tmp.put_u8(self.target_component);
21721        if matches!(version, MavlinkVersion::V2) {
21722            __tmp.put_u8(self.mission_type as u8);
21723            let len = __tmp.len();
21724            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21725        } else {
21726            __tmp.len()
21727        }
21728    }
21729}
21730#[deprecated = "This message is being superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
21731#[doc = "Orientation of a mount."]
21732#[doc = ""]
21733#[doc = "ID: 265"]
21734#[derive(Debug, Clone, PartialEq)]
21735#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21736#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21737#[cfg_attr(feature = "ts", derive(TS))]
21738#[cfg_attr(feature = "ts", ts(export))]
21739pub struct MOUNT_ORIENTATION_DATA {
21740    #[doc = "Timestamp (time since system boot)."]
21741    pub time_boot_ms: u32,
21742    #[doc = "Roll in global frame (set to NaN for invalid)."]
21743    pub roll: f32,
21744    #[doc = "Pitch in global frame (set to NaN for invalid)."]
21745    pub pitch: f32,
21746    #[doc = "Yaw relative to vehicle (set to NaN for invalid)."]
21747    pub yaw: f32,
21748    #[doc = "Yaw in absolute frame relative to Earth's North, north is 0 (set to NaN for invalid)."]
21749    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21750    pub yaw_absolute: f32,
21751}
21752impl MOUNT_ORIENTATION_DATA {
21753    pub const ENCODED_LEN: usize = 20usize;
21754    pub const DEFAULT: Self = Self {
21755        time_boot_ms: 0_u32,
21756        roll: 0.0_f32,
21757        pitch: 0.0_f32,
21758        yaw: 0.0_f32,
21759        yaw_absolute: 0.0_f32,
21760    };
21761    #[cfg(feature = "arbitrary")]
21762    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21763        use arbitrary::{Arbitrary, Unstructured};
21764        let mut buf = [0u8; 1024];
21765        rng.fill_bytes(&mut buf);
21766        let mut unstructured = Unstructured::new(&buf);
21767        Self::arbitrary(&mut unstructured).unwrap_or_default()
21768    }
21769}
21770impl Default for MOUNT_ORIENTATION_DATA {
21771    fn default() -> Self {
21772        Self::DEFAULT.clone()
21773    }
21774}
21775impl MessageData for MOUNT_ORIENTATION_DATA {
21776    type Message = MavMessage;
21777    const ID: u32 = 265u32;
21778    const NAME: &'static str = "MOUNT_ORIENTATION";
21779    const EXTRA_CRC: u8 = 26u8;
21780    const ENCODED_LEN: usize = 20usize;
21781    fn deser(
21782        _version: MavlinkVersion,
21783        __input: &[u8],
21784    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21785        let avail_len = __input.len();
21786        let mut payload_buf = [0; Self::ENCODED_LEN];
21787        let mut buf = if avail_len < Self::ENCODED_LEN {
21788            payload_buf[0..avail_len].copy_from_slice(__input);
21789            Bytes::new(&payload_buf)
21790        } else {
21791            Bytes::new(__input)
21792        };
21793        let mut __struct = Self::default();
21794        __struct.time_boot_ms = buf.get_u32_le();
21795        __struct.roll = buf.get_f32_le();
21796        __struct.pitch = buf.get_f32_le();
21797        __struct.yaw = buf.get_f32_le();
21798        __struct.yaw_absolute = buf.get_f32_le();
21799        Ok(__struct)
21800    }
21801    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21802        let mut __tmp = BytesMut::new(bytes);
21803        #[allow(clippy::absurd_extreme_comparisons)]
21804        #[allow(unused_comparisons)]
21805        if __tmp.remaining() < Self::ENCODED_LEN {
21806            panic!(
21807                "buffer is too small (need {} bytes, but got {})",
21808                Self::ENCODED_LEN,
21809                __tmp.remaining(),
21810            )
21811        }
21812        __tmp.put_u32_le(self.time_boot_ms);
21813        __tmp.put_f32_le(self.roll);
21814        __tmp.put_f32_le(self.pitch);
21815        __tmp.put_f32_le(self.yaw);
21816        if matches!(version, MavlinkVersion::V2) {
21817            __tmp.put_f32_le(self.yaw_absolute);
21818            let len = __tmp.len();
21819            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21820        } else {
21821            __tmp.len()
21822        }
21823    }
21824}
21825#[doc = "Send a key-value pair as float. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
21826#[doc = ""]
21827#[doc = "ID: 251"]
21828#[derive(Debug, Clone, PartialEq)]
21829#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21830#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21831#[cfg_attr(feature = "ts", derive(TS))]
21832#[cfg_attr(feature = "ts", ts(export))]
21833pub struct NAMED_VALUE_FLOAT_DATA {
21834    #[doc = "Timestamp (time since system boot)."]
21835    pub time_boot_ms: u32,
21836    #[doc = "Floating point value"]
21837    pub value: f32,
21838    #[doc = "Name of the debug variable"]
21839    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21840    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21841    pub name: [u8; 10],
21842}
21843impl NAMED_VALUE_FLOAT_DATA {
21844    pub const ENCODED_LEN: usize = 18usize;
21845    pub const DEFAULT: Self = Self {
21846        time_boot_ms: 0_u32,
21847        value: 0.0_f32,
21848        name: [0_u8; 10usize],
21849    };
21850    #[cfg(feature = "arbitrary")]
21851    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21852        use arbitrary::{Arbitrary, Unstructured};
21853        let mut buf = [0u8; 1024];
21854        rng.fill_bytes(&mut buf);
21855        let mut unstructured = Unstructured::new(&buf);
21856        Self::arbitrary(&mut unstructured).unwrap_or_default()
21857    }
21858}
21859impl Default for NAMED_VALUE_FLOAT_DATA {
21860    fn default() -> Self {
21861        Self::DEFAULT.clone()
21862    }
21863}
21864impl MessageData for NAMED_VALUE_FLOAT_DATA {
21865    type Message = MavMessage;
21866    const ID: u32 = 251u32;
21867    const NAME: &'static str = "NAMED_VALUE_FLOAT";
21868    const EXTRA_CRC: u8 = 170u8;
21869    const ENCODED_LEN: usize = 18usize;
21870    fn deser(
21871        _version: MavlinkVersion,
21872        __input: &[u8],
21873    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21874        let avail_len = __input.len();
21875        let mut payload_buf = [0; Self::ENCODED_LEN];
21876        let mut buf = if avail_len < Self::ENCODED_LEN {
21877            payload_buf[0..avail_len].copy_from_slice(__input);
21878            Bytes::new(&payload_buf)
21879        } else {
21880            Bytes::new(__input)
21881        };
21882        let mut __struct = Self::default();
21883        __struct.time_boot_ms = buf.get_u32_le();
21884        __struct.value = buf.get_f32_le();
21885        for v in &mut __struct.name {
21886            let val = buf.get_u8();
21887            *v = val;
21888        }
21889        Ok(__struct)
21890    }
21891    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21892        let mut __tmp = BytesMut::new(bytes);
21893        #[allow(clippy::absurd_extreme_comparisons)]
21894        #[allow(unused_comparisons)]
21895        if __tmp.remaining() < Self::ENCODED_LEN {
21896            panic!(
21897                "buffer is too small (need {} bytes, but got {})",
21898                Self::ENCODED_LEN,
21899                __tmp.remaining(),
21900            )
21901        }
21902        __tmp.put_u32_le(self.time_boot_ms);
21903        __tmp.put_f32_le(self.value);
21904        for val in &self.name {
21905            __tmp.put_u8(*val);
21906        }
21907        if matches!(version, MavlinkVersion::V2) {
21908            let len = __tmp.len();
21909            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21910        } else {
21911            __tmp.len()
21912        }
21913    }
21914}
21915#[doc = "Send a key-value pair as integer. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
21916#[doc = ""]
21917#[doc = "ID: 252"]
21918#[derive(Debug, Clone, PartialEq)]
21919#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21920#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21921#[cfg_attr(feature = "ts", derive(TS))]
21922#[cfg_attr(feature = "ts", ts(export))]
21923pub struct NAMED_VALUE_INT_DATA {
21924    #[doc = "Timestamp (time since system boot)."]
21925    pub time_boot_ms: u32,
21926    #[doc = "Signed integer value"]
21927    pub value: i32,
21928    #[doc = "Name of the debug variable"]
21929    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21930    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21931    pub name: [u8; 10],
21932}
21933impl NAMED_VALUE_INT_DATA {
21934    pub const ENCODED_LEN: usize = 18usize;
21935    pub const DEFAULT: Self = Self {
21936        time_boot_ms: 0_u32,
21937        value: 0_i32,
21938        name: [0_u8; 10usize],
21939    };
21940    #[cfg(feature = "arbitrary")]
21941    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21942        use arbitrary::{Arbitrary, Unstructured};
21943        let mut buf = [0u8; 1024];
21944        rng.fill_bytes(&mut buf);
21945        let mut unstructured = Unstructured::new(&buf);
21946        Self::arbitrary(&mut unstructured).unwrap_or_default()
21947    }
21948}
21949impl Default for NAMED_VALUE_INT_DATA {
21950    fn default() -> Self {
21951        Self::DEFAULT.clone()
21952    }
21953}
21954impl MessageData for NAMED_VALUE_INT_DATA {
21955    type Message = MavMessage;
21956    const ID: u32 = 252u32;
21957    const NAME: &'static str = "NAMED_VALUE_INT";
21958    const EXTRA_CRC: u8 = 44u8;
21959    const ENCODED_LEN: usize = 18usize;
21960    fn deser(
21961        _version: MavlinkVersion,
21962        __input: &[u8],
21963    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21964        let avail_len = __input.len();
21965        let mut payload_buf = [0; Self::ENCODED_LEN];
21966        let mut buf = if avail_len < Self::ENCODED_LEN {
21967            payload_buf[0..avail_len].copy_from_slice(__input);
21968            Bytes::new(&payload_buf)
21969        } else {
21970            Bytes::new(__input)
21971        };
21972        let mut __struct = Self::default();
21973        __struct.time_boot_ms = buf.get_u32_le();
21974        __struct.value = buf.get_i32_le();
21975        for v in &mut __struct.name {
21976            let val = buf.get_u8();
21977            *v = val;
21978        }
21979        Ok(__struct)
21980    }
21981    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21982        let mut __tmp = BytesMut::new(bytes);
21983        #[allow(clippy::absurd_extreme_comparisons)]
21984        #[allow(unused_comparisons)]
21985        if __tmp.remaining() < Self::ENCODED_LEN {
21986            panic!(
21987                "buffer is too small (need {} bytes, but got {})",
21988                Self::ENCODED_LEN,
21989                __tmp.remaining(),
21990            )
21991        }
21992        __tmp.put_u32_le(self.time_boot_ms);
21993        __tmp.put_i32_le(self.value);
21994        for val in &self.name {
21995            __tmp.put_u8(*val);
21996        }
21997        if matches!(version, MavlinkVersion::V2) {
21998            let len = __tmp.len();
21999            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22000        } else {
22001            __tmp.len()
22002        }
22003    }
22004}
22005#[doc = "The state of the navigation and position controller."]
22006#[doc = ""]
22007#[doc = "ID: 62"]
22008#[derive(Debug, Clone, PartialEq)]
22009#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22010#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22011#[cfg_attr(feature = "ts", derive(TS))]
22012#[cfg_attr(feature = "ts", ts(export))]
22013pub struct NAV_CONTROLLER_OUTPUT_DATA {
22014    #[doc = "Current desired roll"]
22015    pub nav_roll: f32,
22016    #[doc = "Current desired pitch"]
22017    pub nav_pitch: f32,
22018    #[doc = "Current altitude error"]
22019    pub alt_error: f32,
22020    #[doc = "Current airspeed error"]
22021    pub aspd_error: f32,
22022    #[doc = "Current crosstrack error on x-y plane"]
22023    pub xtrack_error: f32,
22024    #[doc = "Current desired heading"]
22025    pub nav_bearing: i16,
22026    #[doc = "Bearing to current waypoint/target"]
22027    pub target_bearing: i16,
22028    #[doc = "Distance to active waypoint"]
22029    pub wp_dist: u16,
22030}
22031impl NAV_CONTROLLER_OUTPUT_DATA {
22032    pub const ENCODED_LEN: usize = 26usize;
22033    pub const DEFAULT: Self = Self {
22034        nav_roll: 0.0_f32,
22035        nav_pitch: 0.0_f32,
22036        alt_error: 0.0_f32,
22037        aspd_error: 0.0_f32,
22038        xtrack_error: 0.0_f32,
22039        nav_bearing: 0_i16,
22040        target_bearing: 0_i16,
22041        wp_dist: 0_u16,
22042    };
22043    #[cfg(feature = "arbitrary")]
22044    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22045        use arbitrary::{Arbitrary, Unstructured};
22046        let mut buf = [0u8; 1024];
22047        rng.fill_bytes(&mut buf);
22048        let mut unstructured = Unstructured::new(&buf);
22049        Self::arbitrary(&mut unstructured).unwrap_or_default()
22050    }
22051}
22052impl Default for NAV_CONTROLLER_OUTPUT_DATA {
22053    fn default() -> Self {
22054        Self::DEFAULT.clone()
22055    }
22056}
22057impl MessageData for NAV_CONTROLLER_OUTPUT_DATA {
22058    type Message = MavMessage;
22059    const ID: u32 = 62u32;
22060    const NAME: &'static str = "NAV_CONTROLLER_OUTPUT";
22061    const EXTRA_CRC: u8 = 183u8;
22062    const ENCODED_LEN: usize = 26usize;
22063    fn deser(
22064        _version: MavlinkVersion,
22065        __input: &[u8],
22066    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22067        let avail_len = __input.len();
22068        let mut payload_buf = [0; Self::ENCODED_LEN];
22069        let mut buf = if avail_len < Self::ENCODED_LEN {
22070            payload_buf[0..avail_len].copy_from_slice(__input);
22071            Bytes::new(&payload_buf)
22072        } else {
22073            Bytes::new(__input)
22074        };
22075        let mut __struct = Self::default();
22076        __struct.nav_roll = buf.get_f32_le();
22077        __struct.nav_pitch = buf.get_f32_le();
22078        __struct.alt_error = buf.get_f32_le();
22079        __struct.aspd_error = buf.get_f32_le();
22080        __struct.xtrack_error = buf.get_f32_le();
22081        __struct.nav_bearing = buf.get_i16_le();
22082        __struct.target_bearing = buf.get_i16_le();
22083        __struct.wp_dist = buf.get_u16_le();
22084        Ok(__struct)
22085    }
22086    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22087        let mut __tmp = BytesMut::new(bytes);
22088        #[allow(clippy::absurd_extreme_comparisons)]
22089        #[allow(unused_comparisons)]
22090        if __tmp.remaining() < Self::ENCODED_LEN {
22091            panic!(
22092                "buffer is too small (need {} bytes, but got {})",
22093                Self::ENCODED_LEN,
22094                __tmp.remaining(),
22095            )
22096        }
22097        __tmp.put_f32_le(self.nav_roll);
22098        __tmp.put_f32_le(self.nav_pitch);
22099        __tmp.put_f32_le(self.alt_error);
22100        __tmp.put_f32_le(self.aspd_error);
22101        __tmp.put_f32_le(self.xtrack_error);
22102        __tmp.put_i16_le(self.nav_bearing);
22103        __tmp.put_i16_le(self.target_bearing);
22104        __tmp.put_u16_le(self.wp_dist);
22105        if matches!(version, MavlinkVersion::V2) {
22106            let len = __tmp.len();
22107            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22108        } else {
22109            __tmp.len()
22110        }
22111    }
22112}
22113#[doc = "Obstacle distances in front of the sensor, starting from the left in increment degrees to the right."]
22114#[doc = ""]
22115#[doc = "ID: 330"]
22116#[derive(Debug, Clone, PartialEq)]
22117#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22118#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22119#[cfg_attr(feature = "ts", derive(TS))]
22120#[cfg_attr(feature = "ts", ts(export))]
22121pub struct OBSTACLE_DISTANCE_DATA {
22122    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
22123    pub time_usec: u64,
22124    #[doc = "Distance of obstacles around the vehicle with index 0 corresponding to north + angle_offset, unless otherwise specified in the frame. A value of 0 is valid and means that the obstacle is practically touching the sensor. A value of max_distance +1 means no obstacle is present. A value of UINT16_MAX for unknown/not used. In a array element, one unit corresponds to 1cm."]
22125    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22126    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22127    pub distances: [u16; 72],
22128    #[doc = "Minimum distance the sensor can measure."]
22129    pub min_distance: u16,
22130    #[doc = "Maximum distance the sensor can measure."]
22131    pub max_distance: u16,
22132    #[doc = "Class id of the distance sensor type."]
22133    pub sensor_type: MavDistanceSensor,
22134    #[doc = "Angular width in degrees of each array element. Increment direction is clockwise. This field is ignored if increment_f is non-zero."]
22135    pub increment: u8,
22136    #[doc = "Angular width in degrees of each array element as a float. If non-zero then this value is used instead of the uint8_t increment field. Positive is clockwise direction, negative is counter-clockwise."]
22137    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
22138    pub increment_f: f32,
22139    #[doc = "Relative angle offset of the 0-index element in the distances array. Value of 0 corresponds to forward. Positive is clockwise direction, negative is counter-clockwise."]
22140    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
22141    pub angle_offset: f32,
22142    #[doc = "Coordinate frame of reference for the yaw rotation and offset of the sensor data. Defaults to MAV_FRAME_GLOBAL, which is north aligned. For body-mounted sensors use MAV_FRAME_BODY_FRD, which is vehicle front aligned."]
22143    #[cfg_attr(feature = "serde", serde(default))]
22144    pub frame: MavFrame,
22145}
22146impl OBSTACLE_DISTANCE_DATA {
22147    pub const ENCODED_LEN: usize = 167usize;
22148    pub const DEFAULT: Self = Self {
22149        time_usec: 0_u64,
22150        distances: [0_u16; 72usize],
22151        min_distance: 0_u16,
22152        max_distance: 0_u16,
22153        sensor_type: MavDistanceSensor::DEFAULT,
22154        increment: 0_u8,
22155        increment_f: 0.0_f32,
22156        angle_offset: 0.0_f32,
22157        frame: MavFrame::DEFAULT,
22158    };
22159    #[cfg(feature = "arbitrary")]
22160    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22161        use arbitrary::{Arbitrary, Unstructured};
22162        let mut buf = [0u8; 1024];
22163        rng.fill_bytes(&mut buf);
22164        let mut unstructured = Unstructured::new(&buf);
22165        Self::arbitrary(&mut unstructured).unwrap_or_default()
22166    }
22167}
22168impl Default for OBSTACLE_DISTANCE_DATA {
22169    fn default() -> Self {
22170        Self::DEFAULT.clone()
22171    }
22172}
22173impl MessageData for OBSTACLE_DISTANCE_DATA {
22174    type Message = MavMessage;
22175    const ID: u32 = 330u32;
22176    const NAME: &'static str = "OBSTACLE_DISTANCE";
22177    const EXTRA_CRC: u8 = 23u8;
22178    const ENCODED_LEN: usize = 167usize;
22179    fn deser(
22180        _version: MavlinkVersion,
22181        __input: &[u8],
22182    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22183        let avail_len = __input.len();
22184        let mut payload_buf = [0; Self::ENCODED_LEN];
22185        let mut buf = if avail_len < Self::ENCODED_LEN {
22186            payload_buf[0..avail_len].copy_from_slice(__input);
22187            Bytes::new(&payload_buf)
22188        } else {
22189            Bytes::new(__input)
22190        };
22191        let mut __struct = Self::default();
22192        __struct.time_usec = buf.get_u64_le();
22193        for v in &mut __struct.distances {
22194            let val = buf.get_u16_le();
22195            *v = val;
22196        }
22197        __struct.min_distance = buf.get_u16_le();
22198        __struct.max_distance = buf.get_u16_le();
22199        let tmp = buf.get_u8();
22200        __struct.sensor_type =
22201            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22202                enum_type: "MavDistanceSensor",
22203                value: tmp as u32,
22204            })?;
22205        __struct.increment = buf.get_u8();
22206        __struct.increment_f = buf.get_f32_le();
22207        __struct.angle_offset = buf.get_f32_le();
22208        let tmp = buf.get_u8();
22209        __struct.frame =
22210            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22211                enum_type: "MavFrame",
22212                value: tmp as u32,
22213            })?;
22214        Ok(__struct)
22215    }
22216    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22217        let mut __tmp = BytesMut::new(bytes);
22218        #[allow(clippy::absurd_extreme_comparisons)]
22219        #[allow(unused_comparisons)]
22220        if __tmp.remaining() < Self::ENCODED_LEN {
22221            panic!(
22222                "buffer is too small (need {} bytes, but got {})",
22223                Self::ENCODED_LEN,
22224                __tmp.remaining(),
22225            )
22226        }
22227        __tmp.put_u64_le(self.time_usec);
22228        for val in &self.distances {
22229            __tmp.put_u16_le(*val);
22230        }
22231        __tmp.put_u16_le(self.min_distance);
22232        __tmp.put_u16_le(self.max_distance);
22233        __tmp.put_u8(self.sensor_type as u8);
22234        __tmp.put_u8(self.increment);
22235        if matches!(version, MavlinkVersion::V2) {
22236            __tmp.put_f32_le(self.increment_f);
22237            __tmp.put_f32_le(self.angle_offset);
22238            __tmp.put_u8(self.frame as u8);
22239            let len = __tmp.len();
22240            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22241        } else {
22242            __tmp.len()
22243        }
22244    }
22245}
22246#[doc = "Odometry message to communicate odometry information with an external interface. Fits ROS REP 147 standard for aerial vehicles (<http://www.ros.org/reps/rep-0147.html>)."]
22247#[doc = ""]
22248#[doc = "ID: 331"]
22249#[derive(Debug, Clone, PartialEq)]
22250#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22251#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22252#[cfg_attr(feature = "ts", derive(TS))]
22253#[cfg_attr(feature = "ts", ts(export))]
22254pub struct ODOMETRY_DATA {
22255    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
22256    pub time_usec: u64,
22257    #[doc = "X Position"]
22258    pub x: f32,
22259    #[doc = "Y Position"]
22260    pub y: f32,
22261    #[doc = "Z Position"]
22262    pub z: f32,
22263    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation)"]
22264    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22265    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22266    pub q: [f32; 4],
22267    #[doc = "X linear speed"]
22268    pub vx: f32,
22269    #[doc = "Y linear speed"]
22270    pub vy: f32,
22271    #[doc = "Z linear speed"]
22272    pub vz: f32,
22273    #[doc = "Roll angular speed"]
22274    pub rollspeed: f32,
22275    #[doc = "Pitch angular speed"]
22276    pub pitchspeed: f32,
22277    #[doc = "Yaw angular speed"]
22278    pub yawspeed: f32,
22279    #[doc = "Row-major representation of a 6x6 pose cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
22280    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22281    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22282    pub pose_covariance: [f32; 21],
22283    #[doc = "Row-major representation of a 6x6 velocity cross-covariance matrix upper right triangle (states: vx, vy, vz, rollspeed, pitchspeed, yawspeed; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
22284    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22285    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22286    pub velocity_covariance: [f32; 21],
22287    #[doc = "Coordinate frame of reference for the pose data."]
22288    pub frame_id: MavFrame,
22289    #[doc = "Coordinate frame of reference for the velocity in free space (twist) data."]
22290    pub child_frame_id: MavFrame,
22291    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
22292    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
22293    pub reset_counter: u8,
22294    #[doc = "Type of estimator that is providing the odometry."]
22295    #[cfg_attr(feature = "serde", serde(default))]
22296    pub estimator_type: MavEstimatorType,
22297    #[doc = "Optional odometry quality metric as a percentage. -1 = odometry has failed, 0 = unknown/unset quality, 1 = worst quality, 100 = best quality"]
22298    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
22299    pub quality: i8,
22300}
22301impl ODOMETRY_DATA {
22302    pub const ENCODED_LEN: usize = 233usize;
22303    pub const DEFAULT: Self = Self {
22304        time_usec: 0_u64,
22305        x: 0.0_f32,
22306        y: 0.0_f32,
22307        z: 0.0_f32,
22308        q: [0.0_f32; 4usize],
22309        vx: 0.0_f32,
22310        vy: 0.0_f32,
22311        vz: 0.0_f32,
22312        rollspeed: 0.0_f32,
22313        pitchspeed: 0.0_f32,
22314        yawspeed: 0.0_f32,
22315        pose_covariance: [0.0_f32; 21usize],
22316        velocity_covariance: [0.0_f32; 21usize],
22317        frame_id: MavFrame::DEFAULT,
22318        child_frame_id: MavFrame::DEFAULT,
22319        reset_counter: 0_u8,
22320        estimator_type: MavEstimatorType::DEFAULT,
22321        quality: 0_i8,
22322    };
22323    #[cfg(feature = "arbitrary")]
22324    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22325        use arbitrary::{Arbitrary, Unstructured};
22326        let mut buf = [0u8; 1024];
22327        rng.fill_bytes(&mut buf);
22328        let mut unstructured = Unstructured::new(&buf);
22329        Self::arbitrary(&mut unstructured).unwrap_or_default()
22330    }
22331}
22332impl Default for ODOMETRY_DATA {
22333    fn default() -> Self {
22334        Self::DEFAULT.clone()
22335    }
22336}
22337impl MessageData for ODOMETRY_DATA {
22338    type Message = MavMessage;
22339    const ID: u32 = 331u32;
22340    const NAME: &'static str = "ODOMETRY";
22341    const EXTRA_CRC: u8 = 91u8;
22342    const ENCODED_LEN: usize = 233usize;
22343    fn deser(
22344        _version: MavlinkVersion,
22345        __input: &[u8],
22346    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22347        let avail_len = __input.len();
22348        let mut payload_buf = [0; Self::ENCODED_LEN];
22349        let mut buf = if avail_len < Self::ENCODED_LEN {
22350            payload_buf[0..avail_len].copy_from_slice(__input);
22351            Bytes::new(&payload_buf)
22352        } else {
22353            Bytes::new(__input)
22354        };
22355        let mut __struct = Self::default();
22356        __struct.time_usec = buf.get_u64_le();
22357        __struct.x = buf.get_f32_le();
22358        __struct.y = buf.get_f32_le();
22359        __struct.z = buf.get_f32_le();
22360        for v in &mut __struct.q {
22361            let val = buf.get_f32_le();
22362            *v = val;
22363        }
22364        __struct.vx = buf.get_f32_le();
22365        __struct.vy = buf.get_f32_le();
22366        __struct.vz = buf.get_f32_le();
22367        __struct.rollspeed = buf.get_f32_le();
22368        __struct.pitchspeed = buf.get_f32_le();
22369        __struct.yawspeed = buf.get_f32_le();
22370        for v in &mut __struct.pose_covariance {
22371            let val = buf.get_f32_le();
22372            *v = val;
22373        }
22374        for v in &mut __struct.velocity_covariance {
22375            let val = buf.get_f32_le();
22376            *v = val;
22377        }
22378        let tmp = buf.get_u8();
22379        __struct.frame_id =
22380            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22381                enum_type: "MavFrame",
22382                value: tmp as u32,
22383            })?;
22384        let tmp = buf.get_u8();
22385        __struct.child_frame_id =
22386            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22387                enum_type: "MavFrame",
22388                value: tmp as u32,
22389            })?;
22390        __struct.reset_counter = buf.get_u8();
22391        let tmp = buf.get_u8();
22392        __struct.estimator_type =
22393            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22394                enum_type: "MavEstimatorType",
22395                value: tmp as u32,
22396            })?;
22397        __struct.quality = buf.get_i8();
22398        Ok(__struct)
22399    }
22400    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22401        let mut __tmp = BytesMut::new(bytes);
22402        #[allow(clippy::absurd_extreme_comparisons)]
22403        #[allow(unused_comparisons)]
22404        if __tmp.remaining() < Self::ENCODED_LEN {
22405            panic!(
22406                "buffer is too small (need {} bytes, but got {})",
22407                Self::ENCODED_LEN,
22408                __tmp.remaining(),
22409            )
22410        }
22411        __tmp.put_u64_le(self.time_usec);
22412        __tmp.put_f32_le(self.x);
22413        __tmp.put_f32_le(self.y);
22414        __tmp.put_f32_le(self.z);
22415        for val in &self.q {
22416            __tmp.put_f32_le(*val);
22417        }
22418        __tmp.put_f32_le(self.vx);
22419        __tmp.put_f32_le(self.vy);
22420        __tmp.put_f32_le(self.vz);
22421        __tmp.put_f32_le(self.rollspeed);
22422        __tmp.put_f32_le(self.pitchspeed);
22423        __tmp.put_f32_le(self.yawspeed);
22424        for val in &self.pose_covariance {
22425            __tmp.put_f32_le(*val);
22426        }
22427        for val in &self.velocity_covariance {
22428            __tmp.put_f32_le(*val);
22429        }
22430        __tmp.put_u8(self.frame_id as u8);
22431        __tmp.put_u8(self.child_frame_id as u8);
22432        if matches!(version, MavlinkVersion::V2) {
22433            __tmp.put_u8(self.reset_counter);
22434            __tmp.put_u8(self.estimator_type as u8);
22435            __tmp.put_i8(self.quality);
22436            let len = __tmp.len();
22437            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22438        } else {
22439            __tmp.len()
22440        }
22441    }
22442}
22443#[doc = "Hardware status sent by an onboard computer."]
22444#[doc = ""]
22445#[doc = "ID: 390"]
22446#[derive(Debug, Clone, PartialEq)]
22447#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22448#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22449#[cfg_attr(feature = "ts", derive(TS))]
22450#[cfg_attr(feature = "ts", ts(export))]
22451pub struct ONBOARD_COMPUTER_STATUS_DATA {
22452    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
22453    pub time_usec: u64,
22454    #[doc = "Time since system boot."]
22455    pub uptime: u32,
22456    #[doc = "Amount of used RAM on the component system. A value of UINT32_MAX implies the field is unused."]
22457    pub ram_usage: u32,
22458    #[doc = "Total amount of RAM on the component system. A value of UINT32_MAX implies the field is unused."]
22459    pub ram_total: u32,
22460    #[doc = "Storage type: 0: HDD, 1: SSD, 2: EMMC, 3: SD card (non-removable), 4: SD card (removable). A value of UINT32_MAX implies the field is unused."]
22461    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22462    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22463    pub storage_type: [u32; 4],
22464    #[doc = "Amount of used storage space on the component system. A value of UINT32_MAX implies the field is unused."]
22465    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22466    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22467    pub storage_usage: [u32; 4],
22468    #[doc = "Total amount of storage space on the component system. A value of UINT32_MAX implies the field is unused."]
22469    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22470    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22471    pub storage_total: [u32; 4],
22472    #[doc = "Link type: 0-9: UART, 10-19: Wired network, 20-29: Wifi, 30-39: Point-to-point proprietary, 40-49: Mesh proprietary"]
22473    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22474    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22475    pub link_type: [u32; 6],
22476    #[doc = "Network traffic from the component system. A value of UINT32_MAX implies the field is unused."]
22477    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22478    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22479    pub link_tx_rate: [u32; 6],
22480    #[doc = "Network traffic to the component system. A value of UINT32_MAX implies the field is unused."]
22481    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22482    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22483    pub link_rx_rate: [u32; 6],
22484    #[doc = "Network capacity from the component system. A value of UINT32_MAX implies the field is unused."]
22485    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22486    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22487    pub link_tx_max: [u32; 6],
22488    #[doc = "Network capacity to the component system. A value of UINT32_MAX implies the field is unused."]
22489    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22490    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22491    pub link_rx_max: [u32; 6],
22492    #[doc = "Fan speeds. A value of INT16_MAX implies the field is unused."]
22493    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22494    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22495    pub fan_speed: [i16; 4],
22496    #[doc = "Type of the onboard computer: 0: Mission computer primary, 1: Mission computer backup 1, 2: Mission computer backup 2, 3: Compute node, 4-5: Compute spares, 6-9: Payload computers."]
22497    pub mavtype: u8,
22498    #[doc = "CPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused."]
22499    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22500    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22501    pub cpu_cores: [u8; 8],
22502    #[doc = "Combined CPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused."]
22503    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22504    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22505    pub cpu_combined: [u8; 10],
22506    #[doc = "GPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused."]
22507    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22508    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22509    pub gpu_cores: [u8; 4],
22510    #[doc = "Combined GPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused."]
22511    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22512    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22513    pub gpu_combined: [u8; 10],
22514    #[doc = "Temperature of the board. A value of INT8_MAX implies the field is unused."]
22515    pub temperature_board: i8,
22516    #[doc = "Temperature of the CPU core. A value of INT8_MAX implies the field is unused."]
22517    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22518    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22519    pub temperature_core: [i8; 8],
22520}
22521impl ONBOARD_COMPUTER_STATUS_DATA {
22522    pub const ENCODED_LEN: usize = 238usize;
22523    pub const DEFAULT: Self = Self {
22524        time_usec: 0_u64,
22525        uptime: 0_u32,
22526        ram_usage: 0_u32,
22527        ram_total: 0_u32,
22528        storage_type: [0_u32; 4usize],
22529        storage_usage: [0_u32; 4usize],
22530        storage_total: [0_u32; 4usize],
22531        link_type: [0_u32; 6usize],
22532        link_tx_rate: [0_u32; 6usize],
22533        link_rx_rate: [0_u32; 6usize],
22534        link_tx_max: [0_u32; 6usize],
22535        link_rx_max: [0_u32; 6usize],
22536        fan_speed: [0_i16; 4usize],
22537        mavtype: 0_u8,
22538        cpu_cores: [0_u8; 8usize],
22539        cpu_combined: [0_u8; 10usize],
22540        gpu_cores: [0_u8; 4usize],
22541        gpu_combined: [0_u8; 10usize],
22542        temperature_board: 0_i8,
22543        temperature_core: [0_i8; 8usize],
22544    };
22545    #[cfg(feature = "arbitrary")]
22546    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22547        use arbitrary::{Arbitrary, Unstructured};
22548        let mut buf = [0u8; 1024];
22549        rng.fill_bytes(&mut buf);
22550        let mut unstructured = Unstructured::new(&buf);
22551        Self::arbitrary(&mut unstructured).unwrap_or_default()
22552    }
22553}
22554impl Default for ONBOARD_COMPUTER_STATUS_DATA {
22555    fn default() -> Self {
22556        Self::DEFAULT.clone()
22557    }
22558}
22559impl MessageData for ONBOARD_COMPUTER_STATUS_DATA {
22560    type Message = MavMessage;
22561    const ID: u32 = 390u32;
22562    const NAME: &'static str = "ONBOARD_COMPUTER_STATUS";
22563    const EXTRA_CRC: u8 = 156u8;
22564    const ENCODED_LEN: usize = 238usize;
22565    fn deser(
22566        _version: MavlinkVersion,
22567        __input: &[u8],
22568    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22569        let avail_len = __input.len();
22570        let mut payload_buf = [0; Self::ENCODED_LEN];
22571        let mut buf = if avail_len < Self::ENCODED_LEN {
22572            payload_buf[0..avail_len].copy_from_slice(__input);
22573            Bytes::new(&payload_buf)
22574        } else {
22575            Bytes::new(__input)
22576        };
22577        let mut __struct = Self::default();
22578        __struct.time_usec = buf.get_u64_le();
22579        __struct.uptime = buf.get_u32_le();
22580        __struct.ram_usage = buf.get_u32_le();
22581        __struct.ram_total = buf.get_u32_le();
22582        for v in &mut __struct.storage_type {
22583            let val = buf.get_u32_le();
22584            *v = val;
22585        }
22586        for v in &mut __struct.storage_usage {
22587            let val = buf.get_u32_le();
22588            *v = val;
22589        }
22590        for v in &mut __struct.storage_total {
22591            let val = buf.get_u32_le();
22592            *v = val;
22593        }
22594        for v in &mut __struct.link_type {
22595            let val = buf.get_u32_le();
22596            *v = val;
22597        }
22598        for v in &mut __struct.link_tx_rate {
22599            let val = buf.get_u32_le();
22600            *v = val;
22601        }
22602        for v in &mut __struct.link_rx_rate {
22603            let val = buf.get_u32_le();
22604            *v = val;
22605        }
22606        for v in &mut __struct.link_tx_max {
22607            let val = buf.get_u32_le();
22608            *v = val;
22609        }
22610        for v in &mut __struct.link_rx_max {
22611            let val = buf.get_u32_le();
22612            *v = val;
22613        }
22614        for v in &mut __struct.fan_speed {
22615            let val = buf.get_i16_le();
22616            *v = val;
22617        }
22618        __struct.mavtype = buf.get_u8();
22619        for v in &mut __struct.cpu_cores {
22620            let val = buf.get_u8();
22621            *v = val;
22622        }
22623        for v in &mut __struct.cpu_combined {
22624            let val = buf.get_u8();
22625            *v = val;
22626        }
22627        for v in &mut __struct.gpu_cores {
22628            let val = buf.get_u8();
22629            *v = val;
22630        }
22631        for v in &mut __struct.gpu_combined {
22632            let val = buf.get_u8();
22633            *v = val;
22634        }
22635        __struct.temperature_board = buf.get_i8();
22636        for v in &mut __struct.temperature_core {
22637            let val = buf.get_i8();
22638            *v = val;
22639        }
22640        Ok(__struct)
22641    }
22642    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22643        let mut __tmp = BytesMut::new(bytes);
22644        #[allow(clippy::absurd_extreme_comparisons)]
22645        #[allow(unused_comparisons)]
22646        if __tmp.remaining() < Self::ENCODED_LEN {
22647            panic!(
22648                "buffer is too small (need {} bytes, but got {})",
22649                Self::ENCODED_LEN,
22650                __tmp.remaining(),
22651            )
22652        }
22653        __tmp.put_u64_le(self.time_usec);
22654        __tmp.put_u32_le(self.uptime);
22655        __tmp.put_u32_le(self.ram_usage);
22656        __tmp.put_u32_le(self.ram_total);
22657        for val in &self.storage_type {
22658            __tmp.put_u32_le(*val);
22659        }
22660        for val in &self.storage_usage {
22661            __tmp.put_u32_le(*val);
22662        }
22663        for val in &self.storage_total {
22664            __tmp.put_u32_le(*val);
22665        }
22666        for val in &self.link_type {
22667            __tmp.put_u32_le(*val);
22668        }
22669        for val in &self.link_tx_rate {
22670            __tmp.put_u32_le(*val);
22671        }
22672        for val in &self.link_rx_rate {
22673            __tmp.put_u32_le(*val);
22674        }
22675        for val in &self.link_tx_max {
22676            __tmp.put_u32_le(*val);
22677        }
22678        for val in &self.link_rx_max {
22679            __tmp.put_u32_le(*val);
22680        }
22681        for val in &self.fan_speed {
22682            __tmp.put_i16_le(*val);
22683        }
22684        __tmp.put_u8(self.mavtype);
22685        for val in &self.cpu_cores {
22686            __tmp.put_u8(*val);
22687        }
22688        for val in &self.cpu_combined {
22689            __tmp.put_u8(*val);
22690        }
22691        for val in &self.gpu_cores {
22692            __tmp.put_u8(*val);
22693        }
22694        for val in &self.gpu_combined {
22695            __tmp.put_u8(*val);
22696        }
22697        __tmp.put_i8(self.temperature_board);
22698        for val in &self.temperature_core {
22699            __tmp.put_i8(*val);
22700        }
22701        if matches!(version, MavlinkVersion::V2) {
22702            let len = __tmp.len();
22703            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22704        } else {
22705            __tmp.len()
22706        }
22707    }
22708}
22709#[doc = "Transmitter (remote ID system) is enabled and ready to start sending location and other required information. This is streamed by transmitter. A flight controller uses it as a condition to arm."]
22710#[doc = ""]
22711#[doc = "ID: 12918"]
22712#[derive(Debug, Clone, PartialEq)]
22713#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22714#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22715#[cfg_attr(feature = "ts", derive(TS))]
22716#[cfg_attr(feature = "ts", ts(export))]
22717pub struct OPEN_DRONE_ID_ARM_STATUS_DATA {
22718    #[doc = "Status level indicating if arming is allowed."]
22719    pub status: MavOdidArmStatus,
22720    #[doc = "Text error message, should be empty if status is good to arm. Fill with nulls in unused portion."]
22721    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22722    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22723    pub error: [u8; 50],
22724}
22725impl OPEN_DRONE_ID_ARM_STATUS_DATA {
22726    pub const ENCODED_LEN: usize = 51usize;
22727    pub const DEFAULT: Self = Self {
22728        status: MavOdidArmStatus::DEFAULT,
22729        error: [0_u8; 50usize],
22730    };
22731    #[cfg(feature = "arbitrary")]
22732    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22733        use arbitrary::{Arbitrary, Unstructured};
22734        let mut buf = [0u8; 1024];
22735        rng.fill_bytes(&mut buf);
22736        let mut unstructured = Unstructured::new(&buf);
22737        Self::arbitrary(&mut unstructured).unwrap_or_default()
22738    }
22739}
22740impl Default for OPEN_DRONE_ID_ARM_STATUS_DATA {
22741    fn default() -> Self {
22742        Self::DEFAULT.clone()
22743    }
22744}
22745impl MessageData for OPEN_DRONE_ID_ARM_STATUS_DATA {
22746    type Message = MavMessage;
22747    const ID: u32 = 12918u32;
22748    const NAME: &'static str = "OPEN_DRONE_ID_ARM_STATUS";
22749    const EXTRA_CRC: u8 = 139u8;
22750    const ENCODED_LEN: usize = 51usize;
22751    fn deser(
22752        _version: MavlinkVersion,
22753        __input: &[u8],
22754    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22755        let avail_len = __input.len();
22756        let mut payload_buf = [0; Self::ENCODED_LEN];
22757        let mut buf = if avail_len < Self::ENCODED_LEN {
22758            payload_buf[0..avail_len].copy_from_slice(__input);
22759            Bytes::new(&payload_buf)
22760        } else {
22761            Bytes::new(__input)
22762        };
22763        let mut __struct = Self::default();
22764        let tmp = buf.get_u8();
22765        __struct.status =
22766            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22767                enum_type: "MavOdidArmStatus",
22768                value: tmp as u32,
22769            })?;
22770        for v in &mut __struct.error {
22771            let val = buf.get_u8();
22772            *v = val;
22773        }
22774        Ok(__struct)
22775    }
22776    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22777        let mut __tmp = BytesMut::new(bytes);
22778        #[allow(clippy::absurd_extreme_comparisons)]
22779        #[allow(unused_comparisons)]
22780        if __tmp.remaining() < Self::ENCODED_LEN {
22781            panic!(
22782                "buffer is too small (need {} bytes, but got {})",
22783                Self::ENCODED_LEN,
22784                __tmp.remaining(),
22785            )
22786        }
22787        __tmp.put_u8(self.status as u8);
22788        for val in &self.error {
22789            __tmp.put_u8(*val);
22790        }
22791        if matches!(version, MavlinkVersion::V2) {
22792            let len = __tmp.len();
22793            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22794        } else {
22795            __tmp.len()
22796        }
22797    }
22798}
22799#[doc = "Data for filling the OpenDroneID Authentication message. The Authentication Message defines a field that can provide a means of authenticity for the identity of the UAS (Unmanned Aircraft System). The Authentication message can have two different formats. For data page 0, the fields PageCount, Length and TimeStamp are present and AuthData is only 17 bytes. For data page 1 through 15, PageCount, Length and TimeStamp are not present and the size of AuthData is 23 bytes."]
22800#[doc = ""]
22801#[doc = "ID: 12902"]
22802#[derive(Debug, Clone, PartialEq)]
22803#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22804#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22805#[cfg_attr(feature = "ts", derive(TS))]
22806#[cfg_attr(feature = "ts", ts(export))]
22807pub struct OPEN_DRONE_ID_AUTHENTICATION_DATA {
22808    #[doc = "This field is only present for page 0. 32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
22809    pub timestamp: u32,
22810    #[doc = "System ID (0 for broadcast)."]
22811    pub target_system: u8,
22812    #[doc = "Component ID (0 for broadcast)."]
22813    pub target_component: u8,
22814    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22815    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22816    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22817    pub id_or_mac: [u8; 20],
22818    #[doc = "Indicates the type of authentication."]
22819    pub authentication_type: MavOdidAuthType,
22820    #[doc = "Allowed range is 0 - 15."]
22821    pub data_page: u8,
22822    #[doc = "This field is only present for page 0. Allowed range is 0 - 15. See the description of struct ODID_Auth_data at <https://github.com/opendroneid/opendroneid-core-c/blob/master/libopendroneid/opendroneid.h>."]
22823    pub last_page_index: u8,
22824    #[doc = "This field is only present for page 0. Total bytes of authentication_data from all data pages. See the description of struct ODID_Auth_data at <https://github.com/opendroneid/opendroneid-core-c/blob/master/libopendroneid/opendroneid.h>."]
22825    pub length: u8,
22826    #[doc = "Opaque authentication data. For page 0, the size is only 17 bytes. For other pages, the size is 23 bytes. Shall be filled with nulls in the unused portion of the field."]
22827    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22828    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22829    pub authentication_data: [u8; 23],
22830}
22831impl OPEN_DRONE_ID_AUTHENTICATION_DATA {
22832    pub const ENCODED_LEN: usize = 53usize;
22833    pub const DEFAULT: Self = Self {
22834        timestamp: 0_u32,
22835        target_system: 0_u8,
22836        target_component: 0_u8,
22837        id_or_mac: [0_u8; 20usize],
22838        authentication_type: MavOdidAuthType::DEFAULT,
22839        data_page: 0_u8,
22840        last_page_index: 0_u8,
22841        length: 0_u8,
22842        authentication_data: [0_u8; 23usize],
22843    };
22844    #[cfg(feature = "arbitrary")]
22845    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22846        use arbitrary::{Arbitrary, Unstructured};
22847        let mut buf = [0u8; 1024];
22848        rng.fill_bytes(&mut buf);
22849        let mut unstructured = Unstructured::new(&buf);
22850        Self::arbitrary(&mut unstructured).unwrap_or_default()
22851    }
22852}
22853impl Default for OPEN_DRONE_ID_AUTHENTICATION_DATA {
22854    fn default() -> Self {
22855        Self::DEFAULT.clone()
22856    }
22857}
22858impl MessageData for OPEN_DRONE_ID_AUTHENTICATION_DATA {
22859    type Message = MavMessage;
22860    const ID: u32 = 12902u32;
22861    const NAME: &'static str = "OPEN_DRONE_ID_AUTHENTICATION";
22862    const EXTRA_CRC: u8 = 140u8;
22863    const ENCODED_LEN: usize = 53usize;
22864    fn deser(
22865        _version: MavlinkVersion,
22866        __input: &[u8],
22867    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22868        let avail_len = __input.len();
22869        let mut payload_buf = [0; Self::ENCODED_LEN];
22870        let mut buf = if avail_len < Self::ENCODED_LEN {
22871            payload_buf[0..avail_len].copy_from_slice(__input);
22872            Bytes::new(&payload_buf)
22873        } else {
22874            Bytes::new(__input)
22875        };
22876        let mut __struct = Self::default();
22877        __struct.timestamp = buf.get_u32_le();
22878        __struct.target_system = buf.get_u8();
22879        __struct.target_component = buf.get_u8();
22880        for v in &mut __struct.id_or_mac {
22881            let val = buf.get_u8();
22882            *v = val;
22883        }
22884        let tmp = buf.get_u8();
22885        __struct.authentication_type =
22886            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22887                enum_type: "MavOdidAuthType",
22888                value: tmp as u32,
22889            })?;
22890        __struct.data_page = buf.get_u8();
22891        __struct.last_page_index = buf.get_u8();
22892        __struct.length = buf.get_u8();
22893        for v in &mut __struct.authentication_data {
22894            let val = buf.get_u8();
22895            *v = val;
22896        }
22897        Ok(__struct)
22898    }
22899    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22900        let mut __tmp = BytesMut::new(bytes);
22901        #[allow(clippy::absurd_extreme_comparisons)]
22902        #[allow(unused_comparisons)]
22903        if __tmp.remaining() < Self::ENCODED_LEN {
22904            panic!(
22905                "buffer is too small (need {} bytes, but got {})",
22906                Self::ENCODED_LEN,
22907                __tmp.remaining(),
22908            )
22909        }
22910        __tmp.put_u32_le(self.timestamp);
22911        __tmp.put_u8(self.target_system);
22912        __tmp.put_u8(self.target_component);
22913        for val in &self.id_or_mac {
22914            __tmp.put_u8(*val);
22915        }
22916        __tmp.put_u8(self.authentication_type as u8);
22917        __tmp.put_u8(self.data_page);
22918        __tmp.put_u8(self.last_page_index);
22919        __tmp.put_u8(self.length);
22920        for val in &self.authentication_data {
22921            __tmp.put_u8(*val);
22922        }
22923        if matches!(version, MavlinkVersion::V2) {
22924            let len = __tmp.len();
22925            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22926        } else {
22927            __tmp.len()
22928        }
22929    }
22930}
22931#[doc = "Data for filling the OpenDroneID Basic ID message. This and the below messages are primarily meant for feeding data to/from an OpenDroneID implementation. E.g. <https://github.com/opendroneid/opendroneid-core-c>. These messages are compatible with the ASTM F3411 Remote ID standard and the ASD-STAN prEN 4709-002 Direct Remote ID standard. Additional information and usage of these messages is documented at <https://mavlink.io/en/services/opendroneid.html>."]
22932#[doc = ""]
22933#[doc = "ID: 12900"]
22934#[derive(Debug, Clone, PartialEq)]
22935#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22936#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22937#[cfg_attr(feature = "ts", derive(TS))]
22938#[cfg_attr(feature = "ts", ts(export))]
22939pub struct OPEN_DRONE_ID_BASIC_ID_DATA {
22940    #[doc = "System ID (0 for broadcast)."]
22941    pub target_system: u8,
22942    #[doc = "Component ID (0 for broadcast)."]
22943    pub target_component: u8,
22944    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22945    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22946    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22947    pub id_or_mac: [u8; 20],
22948    #[doc = "Indicates the format for the uas_id field of this message."]
22949    pub id_type: MavOdidIdType,
22950    #[doc = "Indicates the type of UA (Unmanned Aircraft)."]
22951    pub ua_type: MavOdidUaType,
22952    #[doc = "UAS (Unmanned Aircraft System) ID following the format specified by id_type. Shall be filled with nulls in the unused portion of the field."]
22953    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22954    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22955    pub uas_id: [u8; 20],
22956}
22957impl OPEN_DRONE_ID_BASIC_ID_DATA {
22958    pub const ENCODED_LEN: usize = 44usize;
22959    pub const DEFAULT: Self = Self {
22960        target_system: 0_u8,
22961        target_component: 0_u8,
22962        id_or_mac: [0_u8; 20usize],
22963        id_type: MavOdidIdType::DEFAULT,
22964        ua_type: MavOdidUaType::DEFAULT,
22965        uas_id: [0_u8; 20usize],
22966    };
22967    #[cfg(feature = "arbitrary")]
22968    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22969        use arbitrary::{Arbitrary, Unstructured};
22970        let mut buf = [0u8; 1024];
22971        rng.fill_bytes(&mut buf);
22972        let mut unstructured = Unstructured::new(&buf);
22973        Self::arbitrary(&mut unstructured).unwrap_or_default()
22974    }
22975}
22976impl Default for OPEN_DRONE_ID_BASIC_ID_DATA {
22977    fn default() -> Self {
22978        Self::DEFAULT.clone()
22979    }
22980}
22981impl MessageData for OPEN_DRONE_ID_BASIC_ID_DATA {
22982    type Message = MavMessage;
22983    const ID: u32 = 12900u32;
22984    const NAME: &'static str = "OPEN_DRONE_ID_BASIC_ID";
22985    const EXTRA_CRC: u8 = 114u8;
22986    const ENCODED_LEN: usize = 44usize;
22987    fn deser(
22988        _version: MavlinkVersion,
22989        __input: &[u8],
22990    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22991        let avail_len = __input.len();
22992        let mut payload_buf = [0; Self::ENCODED_LEN];
22993        let mut buf = if avail_len < Self::ENCODED_LEN {
22994            payload_buf[0..avail_len].copy_from_slice(__input);
22995            Bytes::new(&payload_buf)
22996        } else {
22997            Bytes::new(__input)
22998        };
22999        let mut __struct = Self::default();
23000        __struct.target_system = buf.get_u8();
23001        __struct.target_component = buf.get_u8();
23002        for v in &mut __struct.id_or_mac {
23003            let val = buf.get_u8();
23004            *v = val;
23005        }
23006        let tmp = buf.get_u8();
23007        __struct.id_type =
23008            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23009                enum_type: "MavOdidIdType",
23010                value: tmp as u32,
23011            })?;
23012        let tmp = buf.get_u8();
23013        __struct.ua_type =
23014            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23015                enum_type: "MavOdidUaType",
23016                value: tmp as u32,
23017            })?;
23018        for v in &mut __struct.uas_id {
23019            let val = buf.get_u8();
23020            *v = val;
23021        }
23022        Ok(__struct)
23023    }
23024    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23025        let mut __tmp = BytesMut::new(bytes);
23026        #[allow(clippy::absurd_extreme_comparisons)]
23027        #[allow(unused_comparisons)]
23028        if __tmp.remaining() < Self::ENCODED_LEN {
23029            panic!(
23030                "buffer is too small (need {} bytes, but got {})",
23031                Self::ENCODED_LEN,
23032                __tmp.remaining(),
23033            )
23034        }
23035        __tmp.put_u8(self.target_system);
23036        __tmp.put_u8(self.target_component);
23037        for val in &self.id_or_mac {
23038            __tmp.put_u8(*val);
23039        }
23040        __tmp.put_u8(self.id_type as u8);
23041        __tmp.put_u8(self.ua_type as u8);
23042        for val in &self.uas_id {
23043            __tmp.put_u8(*val);
23044        }
23045        if matches!(version, MavlinkVersion::V2) {
23046            let len = __tmp.len();
23047            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23048        } else {
23049            __tmp.len()
23050        }
23051    }
23052}
23053#[doc = "Data for filling the OpenDroneID Location message. The float data types are 32-bit IEEE 754. The Location message provides the location, altitude, direction and speed of the aircraft."]
23054#[doc = ""]
23055#[doc = "ID: 12901"]
23056#[derive(Debug, Clone, PartialEq)]
23057#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23058#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23059#[cfg_attr(feature = "ts", derive(TS))]
23060#[cfg_attr(feature = "ts", ts(export))]
23061pub struct OPEN_DRONE_ID_LOCATION_DATA {
23062    #[doc = "Current latitude of the unmanned aircraft. If unknown: 0 (both Lat/Lon)."]
23063    pub latitude: i32,
23064    #[doc = "Current longitude of the unmanned aircraft. If unknown: 0 (both Lat/Lon)."]
23065    pub longitude: i32,
23066    #[doc = "The altitude calculated from the barometric pressue. Reference is against 29.92inHg or 1013.2mb. If unknown: -1000 m."]
23067    pub altitude_barometric: f32,
23068    #[doc = "The geodetic altitude as defined by WGS84. If unknown: -1000 m."]
23069    pub altitude_geodetic: f32,
23070    #[doc = "The current height of the unmanned aircraft above the take-off location or the ground as indicated by height_reference. If unknown: -1000 m."]
23071    pub height: f32,
23072    #[doc = "Seconds after the full hour with reference to UTC time. Typically the GPS outputs a time-of-week value in milliseconds. First convert that to UTC and then convert for this field using ((float) (time_week_ms % (60*60*1000))) / 1000. If unknown: 0xFFFF."]
23073    pub timestamp: f32,
23074    #[doc = "Direction over ground (not heading, but direction of movement) measured clockwise from true North: 0 - 35999 centi-degrees. If unknown: 36100 centi-degrees."]
23075    pub direction: u16,
23076    #[doc = "Ground speed. Positive only. If unknown: 25500 cm/s. If speed is larger than 25425 cm/s, use 25425 cm/s."]
23077    pub speed_horizontal: u16,
23078    #[doc = "The vertical speed. Up is positive. If unknown: 6300 cm/s. If speed is larger than 6200 cm/s, use 6200 cm/s. If lower than -6200 cm/s, use -6200 cm/s."]
23079    pub speed_vertical: i16,
23080    #[doc = "System ID (0 for broadcast)."]
23081    pub target_system: u8,
23082    #[doc = "Component ID (0 for broadcast)."]
23083    pub target_component: u8,
23084    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
23085    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23086    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23087    pub id_or_mac: [u8; 20],
23088    #[doc = "Indicates whether the unmanned aircraft is on the ground or in the air."]
23089    pub status: MavOdidStatus,
23090    #[doc = "Indicates the reference point for the height field."]
23091    pub height_reference: MavOdidHeightRef,
23092    #[doc = "The accuracy of the horizontal position."]
23093    pub horizontal_accuracy: MavOdidHorAcc,
23094    #[doc = "The accuracy of the vertical position."]
23095    pub vertical_accuracy: MavOdidVerAcc,
23096    #[doc = "The accuracy of the barometric altitude."]
23097    pub barometer_accuracy: MavOdidVerAcc,
23098    #[doc = "The accuracy of the horizontal and vertical speed."]
23099    pub speed_accuracy: MavOdidSpeedAcc,
23100    #[doc = "The accuracy of the timestamps."]
23101    pub timestamp_accuracy: MavOdidTimeAcc,
23102}
23103impl OPEN_DRONE_ID_LOCATION_DATA {
23104    pub const ENCODED_LEN: usize = 59usize;
23105    pub const DEFAULT: Self = Self {
23106        latitude: 0_i32,
23107        longitude: 0_i32,
23108        altitude_barometric: 0.0_f32,
23109        altitude_geodetic: 0.0_f32,
23110        height: 0.0_f32,
23111        timestamp: 0.0_f32,
23112        direction: 0_u16,
23113        speed_horizontal: 0_u16,
23114        speed_vertical: 0_i16,
23115        target_system: 0_u8,
23116        target_component: 0_u8,
23117        id_or_mac: [0_u8; 20usize],
23118        status: MavOdidStatus::DEFAULT,
23119        height_reference: MavOdidHeightRef::DEFAULT,
23120        horizontal_accuracy: MavOdidHorAcc::DEFAULT,
23121        vertical_accuracy: MavOdidVerAcc::DEFAULT,
23122        barometer_accuracy: MavOdidVerAcc::DEFAULT,
23123        speed_accuracy: MavOdidSpeedAcc::DEFAULT,
23124        timestamp_accuracy: MavOdidTimeAcc::DEFAULT,
23125    };
23126    #[cfg(feature = "arbitrary")]
23127    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23128        use arbitrary::{Arbitrary, Unstructured};
23129        let mut buf = [0u8; 1024];
23130        rng.fill_bytes(&mut buf);
23131        let mut unstructured = Unstructured::new(&buf);
23132        Self::arbitrary(&mut unstructured).unwrap_or_default()
23133    }
23134}
23135impl Default for OPEN_DRONE_ID_LOCATION_DATA {
23136    fn default() -> Self {
23137        Self::DEFAULT.clone()
23138    }
23139}
23140impl MessageData for OPEN_DRONE_ID_LOCATION_DATA {
23141    type Message = MavMessage;
23142    const ID: u32 = 12901u32;
23143    const NAME: &'static str = "OPEN_DRONE_ID_LOCATION";
23144    const EXTRA_CRC: u8 = 254u8;
23145    const ENCODED_LEN: usize = 59usize;
23146    fn deser(
23147        _version: MavlinkVersion,
23148        __input: &[u8],
23149    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23150        let avail_len = __input.len();
23151        let mut payload_buf = [0; Self::ENCODED_LEN];
23152        let mut buf = if avail_len < Self::ENCODED_LEN {
23153            payload_buf[0..avail_len].copy_from_slice(__input);
23154            Bytes::new(&payload_buf)
23155        } else {
23156            Bytes::new(__input)
23157        };
23158        let mut __struct = Self::default();
23159        __struct.latitude = buf.get_i32_le();
23160        __struct.longitude = buf.get_i32_le();
23161        __struct.altitude_barometric = buf.get_f32_le();
23162        __struct.altitude_geodetic = buf.get_f32_le();
23163        __struct.height = buf.get_f32_le();
23164        __struct.timestamp = buf.get_f32_le();
23165        __struct.direction = buf.get_u16_le();
23166        __struct.speed_horizontal = buf.get_u16_le();
23167        __struct.speed_vertical = buf.get_i16_le();
23168        __struct.target_system = buf.get_u8();
23169        __struct.target_component = buf.get_u8();
23170        for v in &mut __struct.id_or_mac {
23171            let val = buf.get_u8();
23172            *v = val;
23173        }
23174        let tmp = buf.get_u8();
23175        __struct.status =
23176            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23177                enum_type: "MavOdidStatus",
23178                value: tmp as u32,
23179            })?;
23180        let tmp = buf.get_u8();
23181        __struct.height_reference =
23182            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23183                enum_type: "MavOdidHeightRef",
23184                value: tmp as u32,
23185            })?;
23186        let tmp = buf.get_u8();
23187        __struct.horizontal_accuracy =
23188            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23189                enum_type: "MavOdidHorAcc",
23190                value: tmp as u32,
23191            })?;
23192        let tmp = buf.get_u8();
23193        __struct.vertical_accuracy =
23194            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23195                enum_type: "MavOdidVerAcc",
23196                value: tmp as u32,
23197            })?;
23198        let tmp = buf.get_u8();
23199        __struct.barometer_accuracy =
23200            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23201                enum_type: "MavOdidVerAcc",
23202                value: tmp as u32,
23203            })?;
23204        let tmp = buf.get_u8();
23205        __struct.speed_accuracy =
23206            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23207                enum_type: "MavOdidSpeedAcc",
23208                value: tmp as u32,
23209            })?;
23210        let tmp = buf.get_u8();
23211        __struct.timestamp_accuracy =
23212            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23213                enum_type: "MavOdidTimeAcc",
23214                value: tmp as u32,
23215            })?;
23216        Ok(__struct)
23217    }
23218    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23219        let mut __tmp = BytesMut::new(bytes);
23220        #[allow(clippy::absurd_extreme_comparisons)]
23221        #[allow(unused_comparisons)]
23222        if __tmp.remaining() < Self::ENCODED_LEN {
23223            panic!(
23224                "buffer is too small (need {} bytes, but got {})",
23225                Self::ENCODED_LEN,
23226                __tmp.remaining(),
23227            )
23228        }
23229        __tmp.put_i32_le(self.latitude);
23230        __tmp.put_i32_le(self.longitude);
23231        __tmp.put_f32_le(self.altitude_barometric);
23232        __tmp.put_f32_le(self.altitude_geodetic);
23233        __tmp.put_f32_le(self.height);
23234        __tmp.put_f32_le(self.timestamp);
23235        __tmp.put_u16_le(self.direction);
23236        __tmp.put_u16_le(self.speed_horizontal);
23237        __tmp.put_i16_le(self.speed_vertical);
23238        __tmp.put_u8(self.target_system);
23239        __tmp.put_u8(self.target_component);
23240        for val in &self.id_or_mac {
23241            __tmp.put_u8(*val);
23242        }
23243        __tmp.put_u8(self.status as u8);
23244        __tmp.put_u8(self.height_reference as u8);
23245        __tmp.put_u8(self.horizontal_accuracy as u8);
23246        __tmp.put_u8(self.vertical_accuracy as u8);
23247        __tmp.put_u8(self.barometer_accuracy as u8);
23248        __tmp.put_u8(self.speed_accuracy as u8);
23249        __tmp.put_u8(self.timestamp_accuracy as u8);
23250        if matches!(version, MavlinkVersion::V2) {
23251            let len = __tmp.len();
23252            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23253        } else {
23254            __tmp.len()
23255        }
23256    }
23257}
23258#[doc = "An OpenDroneID message pack is a container for multiple encoded OpenDroneID messages (i.e. not in the format given for the above message descriptions but after encoding into the compressed OpenDroneID byte format). Used e.g. when transmitting on Bluetooth 5.0 Long Range/Extended Advertising or on WiFi Neighbor Aware Networking or on WiFi Beacon."]
23259#[doc = ""]
23260#[doc = "ID: 12915"]
23261#[derive(Debug, Clone, PartialEq)]
23262#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23263#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23264#[cfg_attr(feature = "ts", derive(TS))]
23265#[cfg_attr(feature = "ts", ts(export))]
23266pub struct OPEN_DRONE_ID_MESSAGE_PACK_DATA {
23267    #[doc = "System ID (0 for broadcast)."]
23268    pub target_system: u8,
23269    #[doc = "Component ID (0 for broadcast)."]
23270    pub target_component: u8,
23271    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
23272    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23273    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23274    pub id_or_mac: [u8; 20],
23275    #[doc = "This field must currently always be equal to 25 (bytes), since all encoded OpenDroneID messages are specified to have this length."]
23276    pub single_message_size: u8,
23277    #[doc = "Number of encoded messages in the pack (not the number of bytes). Allowed range is 1 - 9."]
23278    pub msg_pack_size: u8,
23279    #[doc = "Concatenation of encoded OpenDroneID messages. Shall be filled with nulls in the unused portion of the field."]
23280    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23281    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23282    pub messages: [u8; 225],
23283}
23284impl OPEN_DRONE_ID_MESSAGE_PACK_DATA {
23285    pub const ENCODED_LEN: usize = 249usize;
23286    pub const DEFAULT: Self = Self {
23287        target_system: 0_u8,
23288        target_component: 0_u8,
23289        id_or_mac: [0_u8; 20usize],
23290        single_message_size: 0_u8,
23291        msg_pack_size: 0_u8,
23292        messages: [0_u8; 225usize],
23293    };
23294    #[cfg(feature = "arbitrary")]
23295    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23296        use arbitrary::{Arbitrary, Unstructured};
23297        let mut buf = [0u8; 1024];
23298        rng.fill_bytes(&mut buf);
23299        let mut unstructured = Unstructured::new(&buf);
23300        Self::arbitrary(&mut unstructured).unwrap_or_default()
23301    }
23302}
23303impl Default for OPEN_DRONE_ID_MESSAGE_PACK_DATA {
23304    fn default() -> Self {
23305        Self::DEFAULT.clone()
23306    }
23307}
23308impl MessageData for OPEN_DRONE_ID_MESSAGE_PACK_DATA {
23309    type Message = MavMessage;
23310    const ID: u32 = 12915u32;
23311    const NAME: &'static str = "OPEN_DRONE_ID_MESSAGE_PACK";
23312    const EXTRA_CRC: u8 = 94u8;
23313    const ENCODED_LEN: usize = 249usize;
23314    fn deser(
23315        _version: MavlinkVersion,
23316        __input: &[u8],
23317    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23318        let avail_len = __input.len();
23319        let mut payload_buf = [0; Self::ENCODED_LEN];
23320        let mut buf = if avail_len < Self::ENCODED_LEN {
23321            payload_buf[0..avail_len].copy_from_slice(__input);
23322            Bytes::new(&payload_buf)
23323        } else {
23324            Bytes::new(__input)
23325        };
23326        let mut __struct = Self::default();
23327        __struct.target_system = buf.get_u8();
23328        __struct.target_component = buf.get_u8();
23329        for v in &mut __struct.id_or_mac {
23330            let val = buf.get_u8();
23331            *v = val;
23332        }
23333        __struct.single_message_size = buf.get_u8();
23334        __struct.msg_pack_size = buf.get_u8();
23335        for v in &mut __struct.messages {
23336            let val = buf.get_u8();
23337            *v = val;
23338        }
23339        Ok(__struct)
23340    }
23341    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23342        let mut __tmp = BytesMut::new(bytes);
23343        #[allow(clippy::absurd_extreme_comparisons)]
23344        #[allow(unused_comparisons)]
23345        if __tmp.remaining() < Self::ENCODED_LEN {
23346            panic!(
23347                "buffer is too small (need {} bytes, but got {})",
23348                Self::ENCODED_LEN,
23349                __tmp.remaining(),
23350            )
23351        }
23352        __tmp.put_u8(self.target_system);
23353        __tmp.put_u8(self.target_component);
23354        for val in &self.id_or_mac {
23355            __tmp.put_u8(*val);
23356        }
23357        __tmp.put_u8(self.single_message_size);
23358        __tmp.put_u8(self.msg_pack_size);
23359        for val in &self.messages {
23360            __tmp.put_u8(*val);
23361        }
23362        if matches!(version, MavlinkVersion::V2) {
23363            let len = __tmp.len();
23364            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23365        } else {
23366            __tmp.len()
23367        }
23368    }
23369}
23370#[doc = "Data for filling the OpenDroneID Operator ID message, which contains the CAA (Civil Aviation Authority) issued operator ID."]
23371#[doc = ""]
23372#[doc = "ID: 12905"]
23373#[derive(Debug, Clone, PartialEq)]
23374#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23375#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23376#[cfg_attr(feature = "ts", derive(TS))]
23377#[cfg_attr(feature = "ts", ts(export))]
23378pub struct OPEN_DRONE_ID_OPERATOR_ID_DATA {
23379    #[doc = "System ID (0 for broadcast)."]
23380    pub target_system: u8,
23381    #[doc = "Component ID (0 for broadcast)."]
23382    pub target_component: u8,
23383    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
23384    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23385    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23386    pub id_or_mac: [u8; 20],
23387    #[doc = "Indicates the type of the operator_id field."]
23388    pub operator_id_type: MavOdidOperatorIdType,
23389    #[doc = "Text description or numeric value expressed as ASCII characters. Shall be filled with nulls in the unused portion of the field."]
23390    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23391    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23392    pub operator_id: [u8; 20],
23393}
23394impl OPEN_DRONE_ID_OPERATOR_ID_DATA {
23395    pub const ENCODED_LEN: usize = 43usize;
23396    pub const DEFAULT: Self = Self {
23397        target_system: 0_u8,
23398        target_component: 0_u8,
23399        id_or_mac: [0_u8; 20usize],
23400        operator_id_type: MavOdidOperatorIdType::DEFAULT,
23401        operator_id: [0_u8; 20usize],
23402    };
23403    #[cfg(feature = "arbitrary")]
23404    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23405        use arbitrary::{Arbitrary, Unstructured};
23406        let mut buf = [0u8; 1024];
23407        rng.fill_bytes(&mut buf);
23408        let mut unstructured = Unstructured::new(&buf);
23409        Self::arbitrary(&mut unstructured).unwrap_or_default()
23410    }
23411}
23412impl Default for OPEN_DRONE_ID_OPERATOR_ID_DATA {
23413    fn default() -> Self {
23414        Self::DEFAULT.clone()
23415    }
23416}
23417impl MessageData for OPEN_DRONE_ID_OPERATOR_ID_DATA {
23418    type Message = MavMessage;
23419    const ID: u32 = 12905u32;
23420    const NAME: &'static str = "OPEN_DRONE_ID_OPERATOR_ID";
23421    const EXTRA_CRC: u8 = 49u8;
23422    const ENCODED_LEN: usize = 43usize;
23423    fn deser(
23424        _version: MavlinkVersion,
23425        __input: &[u8],
23426    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23427        let avail_len = __input.len();
23428        let mut payload_buf = [0; Self::ENCODED_LEN];
23429        let mut buf = if avail_len < Self::ENCODED_LEN {
23430            payload_buf[0..avail_len].copy_from_slice(__input);
23431            Bytes::new(&payload_buf)
23432        } else {
23433            Bytes::new(__input)
23434        };
23435        let mut __struct = Self::default();
23436        __struct.target_system = buf.get_u8();
23437        __struct.target_component = buf.get_u8();
23438        for v in &mut __struct.id_or_mac {
23439            let val = buf.get_u8();
23440            *v = val;
23441        }
23442        let tmp = buf.get_u8();
23443        __struct.operator_id_type =
23444            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23445                enum_type: "MavOdidOperatorIdType",
23446                value: tmp as u32,
23447            })?;
23448        for v in &mut __struct.operator_id {
23449            let val = buf.get_u8();
23450            *v = val;
23451        }
23452        Ok(__struct)
23453    }
23454    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23455        let mut __tmp = BytesMut::new(bytes);
23456        #[allow(clippy::absurd_extreme_comparisons)]
23457        #[allow(unused_comparisons)]
23458        if __tmp.remaining() < Self::ENCODED_LEN {
23459            panic!(
23460                "buffer is too small (need {} bytes, but got {})",
23461                Self::ENCODED_LEN,
23462                __tmp.remaining(),
23463            )
23464        }
23465        __tmp.put_u8(self.target_system);
23466        __tmp.put_u8(self.target_component);
23467        for val in &self.id_or_mac {
23468            __tmp.put_u8(*val);
23469        }
23470        __tmp.put_u8(self.operator_id_type as u8);
23471        for val in &self.operator_id {
23472            __tmp.put_u8(*val);
23473        }
23474        if matches!(version, MavlinkVersion::V2) {
23475            let len = __tmp.len();
23476            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23477        } else {
23478            __tmp.len()
23479        }
23480    }
23481}
23482#[doc = "Data for filling the OpenDroneID Self ID message. The Self ID Message is an opportunity for the operator to (optionally) declare their identity and purpose of the flight. This message can provide additional information that could reduce the threat profile of a UA (Unmanned Aircraft) flying in a particular area or manner. This message can also be used to provide optional additional clarification in an emergency/remote ID system failure situation."]
23483#[doc = ""]
23484#[doc = "ID: 12903"]
23485#[derive(Debug, Clone, PartialEq)]
23486#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23487#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23488#[cfg_attr(feature = "ts", derive(TS))]
23489#[cfg_attr(feature = "ts", ts(export))]
23490pub struct OPEN_DRONE_ID_SELF_ID_DATA {
23491    #[doc = "System ID (0 for broadcast)."]
23492    pub target_system: u8,
23493    #[doc = "Component ID (0 for broadcast)."]
23494    pub target_component: u8,
23495    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
23496    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23497    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23498    pub id_or_mac: [u8; 20],
23499    #[doc = "Indicates the type of the description field."]
23500    pub description_type: MavOdidDescType,
23501    #[doc = "Text description or numeric value expressed as ASCII characters. Shall be filled with nulls in the unused portion of the field."]
23502    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23503    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23504    pub description: [u8; 23],
23505}
23506impl OPEN_DRONE_ID_SELF_ID_DATA {
23507    pub const ENCODED_LEN: usize = 46usize;
23508    pub const DEFAULT: Self = Self {
23509        target_system: 0_u8,
23510        target_component: 0_u8,
23511        id_or_mac: [0_u8; 20usize],
23512        description_type: MavOdidDescType::DEFAULT,
23513        description: [0_u8; 23usize],
23514    };
23515    #[cfg(feature = "arbitrary")]
23516    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23517        use arbitrary::{Arbitrary, Unstructured};
23518        let mut buf = [0u8; 1024];
23519        rng.fill_bytes(&mut buf);
23520        let mut unstructured = Unstructured::new(&buf);
23521        Self::arbitrary(&mut unstructured).unwrap_or_default()
23522    }
23523}
23524impl Default for OPEN_DRONE_ID_SELF_ID_DATA {
23525    fn default() -> Self {
23526        Self::DEFAULT.clone()
23527    }
23528}
23529impl MessageData for OPEN_DRONE_ID_SELF_ID_DATA {
23530    type Message = MavMessage;
23531    const ID: u32 = 12903u32;
23532    const NAME: &'static str = "OPEN_DRONE_ID_SELF_ID";
23533    const EXTRA_CRC: u8 = 249u8;
23534    const ENCODED_LEN: usize = 46usize;
23535    fn deser(
23536        _version: MavlinkVersion,
23537        __input: &[u8],
23538    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23539        let avail_len = __input.len();
23540        let mut payload_buf = [0; Self::ENCODED_LEN];
23541        let mut buf = if avail_len < Self::ENCODED_LEN {
23542            payload_buf[0..avail_len].copy_from_slice(__input);
23543            Bytes::new(&payload_buf)
23544        } else {
23545            Bytes::new(__input)
23546        };
23547        let mut __struct = Self::default();
23548        __struct.target_system = buf.get_u8();
23549        __struct.target_component = buf.get_u8();
23550        for v in &mut __struct.id_or_mac {
23551            let val = buf.get_u8();
23552            *v = val;
23553        }
23554        let tmp = buf.get_u8();
23555        __struct.description_type =
23556            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23557                enum_type: "MavOdidDescType",
23558                value: tmp as u32,
23559            })?;
23560        for v in &mut __struct.description {
23561            let val = buf.get_u8();
23562            *v = val;
23563        }
23564        Ok(__struct)
23565    }
23566    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23567        let mut __tmp = BytesMut::new(bytes);
23568        #[allow(clippy::absurd_extreme_comparisons)]
23569        #[allow(unused_comparisons)]
23570        if __tmp.remaining() < Self::ENCODED_LEN {
23571            panic!(
23572                "buffer is too small (need {} bytes, but got {})",
23573                Self::ENCODED_LEN,
23574                __tmp.remaining(),
23575            )
23576        }
23577        __tmp.put_u8(self.target_system);
23578        __tmp.put_u8(self.target_component);
23579        for val in &self.id_or_mac {
23580            __tmp.put_u8(*val);
23581        }
23582        __tmp.put_u8(self.description_type as u8);
23583        for val in &self.description {
23584            __tmp.put_u8(*val);
23585        }
23586        if matches!(version, MavlinkVersion::V2) {
23587            let len = __tmp.len();
23588            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23589        } else {
23590            __tmp.len()
23591        }
23592    }
23593}
23594#[doc = "Data for filling the OpenDroneID System message. The System Message contains general system information including the operator location/altitude and possible aircraft group and/or category/class information."]
23595#[doc = ""]
23596#[doc = "ID: 12904"]
23597#[derive(Debug, Clone, PartialEq)]
23598#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23599#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23600#[cfg_attr(feature = "ts", derive(TS))]
23601#[cfg_attr(feature = "ts", ts(export))]
23602pub struct OPEN_DRONE_ID_SYSTEM_DATA {
23603    #[doc = "Latitude of the operator. If unknown: 0 (both Lat/Lon)."]
23604    pub operator_latitude: i32,
23605    #[doc = "Longitude of the operator. If unknown: 0 (both Lat/Lon)."]
23606    pub operator_longitude: i32,
23607    #[doc = "Area Operations Ceiling relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA."]
23608    pub area_ceiling: f32,
23609    #[doc = "Area Operations Floor relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA."]
23610    pub area_floor: f32,
23611    #[doc = "Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m."]
23612    pub operator_altitude_geo: f32,
23613    #[doc = "32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
23614    pub timestamp: u32,
23615    #[doc = "Number of aircraft in the area, group or formation (default 1). Used only for swarms/multiple UA."]
23616    pub area_count: u16,
23617    #[doc = "Radius of the cylindrical area of the group or formation (default 0). Used only for swarms/multiple UA."]
23618    pub area_radius: u16,
23619    #[doc = "System ID (0 for broadcast)."]
23620    pub target_system: u8,
23621    #[doc = "Component ID (0 for broadcast)."]
23622    pub target_component: u8,
23623    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
23624    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23625    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23626    pub id_or_mac: [u8; 20],
23627    #[doc = "Specifies the operator location type."]
23628    pub operator_location_type: MavOdidOperatorLocationType,
23629    #[doc = "Specifies the classification type of the UA."]
23630    pub classification_type: MavOdidClassificationType,
23631    #[doc = "When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the category of the UA."]
23632    pub category_eu: MavOdidCategoryEu,
23633    #[doc = "When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the class of the UA."]
23634    pub class_eu: MavOdidClassEu,
23635}
23636impl OPEN_DRONE_ID_SYSTEM_DATA {
23637    pub const ENCODED_LEN: usize = 54usize;
23638    pub const DEFAULT: Self = Self {
23639        operator_latitude: 0_i32,
23640        operator_longitude: 0_i32,
23641        area_ceiling: 0.0_f32,
23642        area_floor: 0.0_f32,
23643        operator_altitude_geo: 0.0_f32,
23644        timestamp: 0_u32,
23645        area_count: 0_u16,
23646        area_radius: 0_u16,
23647        target_system: 0_u8,
23648        target_component: 0_u8,
23649        id_or_mac: [0_u8; 20usize],
23650        operator_location_type: MavOdidOperatorLocationType::DEFAULT,
23651        classification_type: MavOdidClassificationType::DEFAULT,
23652        category_eu: MavOdidCategoryEu::DEFAULT,
23653        class_eu: MavOdidClassEu::DEFAULT,
23654    };
23655    #[cfg(feature = "arbitrary")]
23656    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23657        use arbitrary::{Arbitrary, Unstructured};
23658        let mut buf = [0u8; 1024];
23659        rng.fill_bytes(&mut buf);
23660        let mut unstructured = Unstructured::new(&buf);
23661        Self::arbitrary(&mut unstructured).unwrap_or_default()
23662    }
23663}
23664impl Default for OPEN_DRONE_ID_SYSTEM_DATA {
23665    fn default() -> Self {
23666        Self::DEFAULT.clone()
23667    }
23668}
23669impl MessageData for OPEN_DRONE_ID_SYSTEM_DATA {
23670    type Message = MavMessage;
23671    const ID: u32 = 12904u32;
23672    const NAME: &'static str = "OPEN_DRONE_ID_SYSTEM";
23673    const EXTRA_CRC: u8 = 77u8;
23674    const ENCODED_LEN: usize = 54usize;
23675    fn deser(
23676        _version: MavlinkVersion,
23677        __input: &[u8],
23678    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23679        let avail_len = __input.len();
23680        let mut payload_buf = [0; Self::ENCODED_LEN];
23681        let mut buf = if avail_len < Self::ENCODED_LEN {
23682            payload_buf[0..avail_len].copy_from_slice(__input);
23683            Bytes::new(&payload_buf)
23684        } else {
23685            Bytes::new(__input)
23686        };
23687        let mut __struct = Self::default();
23688        __struct.operator_latitude = buf.get_i32_le();
23689        __struct.operator_longitude = buf.get_i32_le();
23690        __struct.area_ceiling = buf.get_f32_le();
23691        __struct.area_floor = buf.get_f32_le();
23692        __struct.operator_altitude_geo = buf.get_f32_le();
23693        __struct.timestamp = buf.get_u32_le();
23694        __struct.area_count = buf.get_u16_le();
23695        __struct.area_radius = buf.get_u16_le();
23696        __struct.target_system = buf.get_u8();
23697        __struct.target_component = buf.get_u8();
23698        for v in &mut __struct.id_or_mac {
23699            let val = buf.get_u8();
23700            *v = val;
23701        }
23702        let tmp = buf.get_u8();
23703        __struct.operator_location_type =
23704            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23705                enum_type: "MavOdidOperatorLocationType",
23706                value: tmp as u32,
23707            })?;
23708        let tmp = buf.get_u8();
23709        __struct.classification_type =
23710            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23711                enum_type: "MavOdidClassificationType",
23712                value: tmp as u32,
23713            })?;
23714        let tmp = buf.get_u8();
23715        __struct.category_eu =
23716            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23717                enum_type: "MavOdidCategoryEu",
23718                value: tmp as u32,
23719            })?;
23720        let tmp = buf.get_u8();
23721        __struct.class_eu =
23722            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23723                enum_type: "MavOdidClassEu",
23724                value: tmp as u32,
23725            })?;
23726        Ok(__struct)
23727    }
23728    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23729        let mut __tmp = BytesMut::new(bytes);
23730        #[allow(clippy::absurd_extreme_comparisons)]
23731        #[allow(unused_comparisons)]
23732        if __tmp.remaining() < Self::ENCODED_LEN {
23733            panic!(
23734                "buffer is too small (need {} bytes, but got {})",
23735                Self::ENCODED_LEN,
23736                __tmp.remaining(),
23737            )
23738        }
23739        __tmp.put_i32_le(self.operator_latitude);
23740        __tmp.put_i32_le(self.operator_longitude);
23741        __tmp.put_f32_le(self.area_ceiling);
23742        __tmp.put_f32_le(self.area_floor);
23743        __tmp.put_f32_le(self.operator_altitude_geo);
23744        __tmp.put_u32_le(self.timestamp);
23745        __tmp.put_u16_le(self.area_count);
23746        __tmp.put_u16_le(self.area_radius);
23747        __tmp.put_u8(self.target_system);
23748        __tmp.put_u8(self.target_component);
23749        for val in &self.id_or_mac {
23750            __tmp.put_u8(*val);
23751        }
23752        __tmp.put_u8(self.operator_location_type as u8);
23753        __tmp.put_u8(self.classification_type as u8);
23754        __tmp.put_u8(self.category_eu as u8);
23755        __tmp.put_u8(self.class_eu as u8);
23756        if matches!(version, MavlinkVersion::V2) {
23757            let len = __tmp.len();
23758            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23759        } else {
23760            __tmp.len()
23761        }
23762    }
23763}
23764#[doc = "Update the data in the OPEN_DRONE_ID_SYSTEM message with new location information. This can be sent to update the location information for the operator when no other information in the SYSTEM message has changed. This message allows for efficient operation on radio links which have limited uplink bandwidth while meeting requirements for update frequency of the operator location."]
23765#[doc = ""]
23766#[doc = "ID: 12919"]
23767#[derive(Debug, Clone, PartialEq)]
23768#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23769#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23770#[cfg_attr(feature = "ts", derive(TS))]
23771#[cfg_attr(feature = "ts", ts(export))]
23772pub struct OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
23773    #[doc = "Latitude of the operator. If unknown: 0 (both Lat/Lon)."]
23774    pub operator_latitude: i32,
23775    #[doc = "Longitude of the operator. If unknown: 0 (both Lat/Lon)."]
23776    pub operator_longitude: i32,
23777    #[doc = "Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m."]
23778    pub operator_altitude_geo: f32,
23779    #[doc = "32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
23780    pub timestamp: u32,
23781    #[doc = "System ID (0 for broadcast)."]
23782    pub target_system: u8,
23783    #[doc = "Component ID (0 for broadcast)."]
23784    pub target_component: u8,
23785}
23786impl OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
23787    pub const ENCODED_LEN: usize = 18usize;
23788    pub const DEFAULT: Self = Self {
23789        operator_latitude: 0_i32,
23790        operator_longitude: 0_i32,
23791        operator_altitude_geo: 0.0_f32,
23792        timestamp: 0_u32,
23793        target_system: 0_u8,
23794        target_component: 0_u8,
23795    };
23796    #[cfg(feature = "arbitrary")]
23797    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23798        use arbitrary::{Arbitrary, Unstructured};
23799        let mut buf = [0u8; 1024];
23800        rng.fill_bytes(&mut buf);
23801        let mut unstructured = Unstructured::new(&buf);
23802        Self::arbitrary(&mut unstructured).unwrap_or_default()
23803    }
23804}
23805impl Default for OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
23806    fn default() -> Self {
23807        Self::DEFAULT.clone()
23808    }
23809}
23810impl MessageData for OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
23811    type Message = MavMessage;
23812    const ID: u32 = 12919u32;
23813    const NAME: &'static str = "OPEN_DRONE_ID_SYSTEM_UPDATE";
23814    const EXTRA_CRC: u8 = 7u8;
23815    const ENCODED_LEN: usize = 18usize;
23816    fn deser(
23817        _version: MavlinkVersion,
23818        __input: &[u8],
23819    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23820        let avail_len = __input.len();
23821        let mut payload_buf = [0; Self::ENCODED_LEN];
23822        let mut buf = if avail_len < Self::ENCODED_LEN {
23823            payload_buf[0..avail_len].copy_from_slice(__input);
23824            Bytes::new(&payload_buf)
23825        } else {
23826            Bytes::new(__input)
23827        };
23828        let mut __struct = Self::default();
23829        __struct.operator_latitude = buf.get_i32_le();
23830        __struct.operator_longitude = buf.get_i32_le();
23831        __struct.operator_altitude_geo = buf.get_f32_le();
23832        __struct.timestamp = buf.get_u32_le();
23833        __struct.target_system = buf.get_u8();
23834        __struct.target_component = buf.get_u8();
23835        Ok(__struct)
23836    }
23837    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23838        let mut __tmp = BytesMut::new(bytes);
23839        #[allow(clippy::absurd_extreme_comparisons)]
23840        #[allow(unused_comparisons)]
23841        if __tmp.remaining() < Self::ENCODED_LEN {
23842            panic!(
23843                "buffer is too small (need {} bytes, but got {})",
23844                Self::ENCODED_LEN,
23845                __tmp.remaining(),
23846            )
23847        }
23848        __tmp.put_i32_le(self.operator_latitude);
23849        __tmp.put_i32_le(self.operator_longitude);
23850        __tmp.put_f32_le(self.operator_altitude_geo);
23851        __tmp.put_u32_le(self.timestamp);
23852        __tmp.put_u8(self.target_system);
23853        __tmp.put_u8(self.target_component);
23854        if matches!(version, MavlinkVersion::V2) {
23855            let len = __tmp.len();
23856            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23857        } else {
23858            __tmp.len()
23859        }
23860    }
23861}
23862#[doc = "Optical flow from a flow sensor (e.g. optical mouse sensor)."]
23863#[doc = ""]
23864#[doc = "ID: 100"]
23865#[derive(Debug, Clone, PartialEq)]
23866#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23867#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23868#[cfg_attr(feature = "ts", derive(TS))]
23869#[cfg_attr(feature = "ts", ts(export))]
23870pub struct OPTICAL_FLOW_DATA {
23871    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
23872    pub time_usec: u64,
23873    #[doc = "Flow in x-sensor direction, angular-speed compensated"]
23874    pub flow_comp_m_x: f32,
23875    #[doc = "Flow in y-sensor direction, angular-speed compensated"]
23876    pub flow_comp_m_y: f32,
23877    #[doc = "Ground distance. Positive value: distance known. Negative value: Unknown distance"]
23878    pub ground_distance: f32,
23879    #[doc = "Flow in x-sensor direction"]
23880    pub flow_x: i16,
23881    #[doc = "Flow in y-sensor direction"]
23882    pub flow_y: i16,
23883    #[doc = "Sensor ID"]
23884    pub sensor_id: u8,
23885    #[doc = "Optical flow quality / confidence. 0: bad, 255: maximum quality"]
23886    pub quality: u8,
23887    #[doc = "Flow rate about X axis"]
23888    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
23889    pub flow_rate_x: f32,
23890    #[doc = "Flow rate about Y axis"]
23891    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
23892    pub flow_rate_y: f32,
23893}
23894impl OPTICAL_FLOW_DATA {
23895    pub const ENCODED_LEN: usize = 34usize;
23896    pub const DEFAULT: Self = Self {
23897        time_usec: 0_u64,
23898        flow_comp_m_x: 0.0_f32,
23899        flow_comp_m_y: 0.0_f32,
23900        ground_distance: 0.0_f32,
23901        flow_x: 0_i16,
23902        flow_y: 0_i16,
23903        sensor_id: 0_u8,
23904        quality: 0_u8,
23905        flow_rate_x: 0.0_f32,
23906        flow_rate_y: 0.0_f32,
23907    };
23908    #[cfg(feature = "arbitrary")]
23909    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23910        use arbitrary::{Arbitrary, Unstructured};
23911        let mut buf = [0u8; 1024];
23912        rng.fill_bytes(&mut buf);
23913        let mut unstructured = Unstructured::new(&buf);
23914        Self::arbitrary(&mut unstructured).unwrap_or_default()
23915    }
23916}
23917impl Default for OPTICAL_FLOW_DATA {
23918    fn default() -> Self {
23919        Self::DEFAULT.clone()
23920    }
23921}
23922impl MessageData for OPTICAL_FLOW_DATA {
23923    type Message = MavMessage;
23924    const ID: u32 = 100u32;
23925    const NAME: &'static str = "OPTICAL_FLOW";
23926    const EXTRA_CRC: u8 = 175u8;
23927    const ENCODED_LEN: usize = 34usize;
23928    fn deser(
23929        _version: MavlinkVersion,
23930        __input: &[u8],
23931    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23932        let avail_len = __input.len();
23933        let mut payload_buf = [0; Self::ENCODED_LEN];
23934        let mut buf = if avail_len < Self::ENCODED_LEN {
23935            payload_buf[0..avail_len].copy_from_slice(__input);
23936            Bytes::new(&payload_buf)
23937        } else {
23938            Bytes::new(__input)
23939        };
23940        let mut __struct = Self::default();
23941        __struct.time_usec = buf.get_u64_le();
23942        __struct.flow_comp_m_x = buf.get_f32_le();
23943        __struct.flow_comp_m_y = buf.get_f32_le();
23944        __struct.ground_distance = buf.get_f32_le();
23945        __struct.flow_x = buf.get_i16_le();
23946        __struct.flow_y = buf.get_i16_le();
23947        __struct.sensor_id = buf.get_u8();
23948        __struct.quality = buf.get_u8();
23949        __struct.flow_rate_x = buf.get_f32_le();
23950        __struct.flow_rate_y = buf.get_f32_le();
23951        Ok(__struct)
23952    }
23953    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23954        let mut __tmp = BytesMut::new(bytes);
23955        #[allow(clippy::absurd_extreme_comparisons)]
23956        #[allow(unused_comparisons)]
23957        if __tmp.remaining() < Self::ENCODED_LEN {
23958            panic!(
23959                "buffer is too small (need {} bytes, but got {})",
23960                Self::ENCODED_LEN,
23961                __tmp.remaining(),
23962            )
23963        }
23964        __tmp.put_u64_le(self.time_usec);
23965        __tmp.put_f32_le(self.flow_comp_m_x);
23966        __tmp.put_f32_le(self.flow_comp_m_y);
23967        __tmp.put_f32_le(self.ground_distance);
23968        __tmp.put_i16_le(self.flow_x);
23969        __tmp.put_i16_le(self.flow_y);
23970        __tmp.put_u8(self.sensor_id);
23971        __tmp.put_u8(self.quality);
23972        if matches!(version, MavlinkVersion::V2) {
23973            __tmp.put_f32_le(self.flow_rate_x);
23974            __tmp.put_f32_le(self.flow_rate_y);
23975            let len = __tmp.len();
23976            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23977        } else {
23978            __tmp.len()
23979        }
23980    }
23981}
23982#[doc = "Optical flow from an angular rate flow sensor (e.g. PX4FLOW or mouse sensor)."]
23983#[doc = ""]
23984#[doc = "ID: 106"]
23985#[derive(Debug, Clone, PartialEq)]
23986#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23987#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23988#[cfg_attr(feature = "ts", derive(TS))]
23989#[cfg_attr(feature = "ts", ts(export))]
23990pub struct OPTICAL_FLOW_RAD_DATA {
23991    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
23992    pub time_usec: u64,
23993    #[doc = "Integration time. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the."]
23994    pub integration_time_us: u32,
23995    #[doc = "Flow around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.)"]
23996    pub integrated_x: f32,
23997    #[doc = "Flow around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.)"]
23998    pub integrated_y: f32,
23999    #[doc = "RH rotation around X axis"]
24000    pub integrated_xgyro: f32,
24001    #[doc = "RH rotation around Y axis"]
24002    pub integrated_ygyro: f32,
24003    #[doc = "RH rotation around Z axis"]
24004    pub integrated_zgyro: f32,
24005    #[doc = "Time since the distance was sampled."]
24006    pub time_delta_distance_us: u32,
24007    #[doc = "Distance to the center of the flow field. Positive value (including zero): distance known. Negative value: Unknown distance."]
24008    pub distance: f32,
24009    #[doc = "Temperature"]
24010    pub temperature: i16,
24011    #[doc = "Sensor ID"]
24012    pub sensor_id: u8,
24013    #[doc = "Optical flow quality / confidence. 0: no valid flow, 255: maximum quality"]
24014    pub quality: u8,
24015}
24016impl OPTICAL_FLOW_RAD_DATA {
24017    pub const ENCODED_LEN: usize = 44usize;
24018    pub const DEFAULT: Self = Self {
24019        time_usec: 0_u64,
24020        integration_time_us: 0_u32,
24021        integrated_x: 0.0_f32,
24022        integrated_y: 0.0_f32,
24023        integrated_xgyro: 0.0_f32,
24024        integrated_ygyro: 0.0_f32,
24025        integrated_zgyro: 0.0_f32,
24026        time_delta_distance_us: 0_u32,
24027        distance: 0.0_f32,
24028        temperature: 0_i16,
24029        sensor_id: 0_u8,
24030        quality: 0_u8,
24031    };
24032    #[cfg(feature = "arbitrary")]
24033    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24034        use arbitrary::{Arbitrary, Unstructured};
24035        let mut buf = [0u8; 1024];
24036        rng.fill_bytes(&mut buf);
24037        let mut unstructured = Unstructured::new(&buf);
24038        Self::arbitrary(&mut unstructured).unwrap_or_default()
24039    }
24040}
24041impl Default for OPTICAL_FLOW_RAD_DATA {
24042    fn default() -> Self {
24043        Self::DEFAULT.clone()
24044    }
24045}
24046impl MessageData for OPTICAL_FLOW_RAD_DATA {
24047    type Message = MavMessage;
24048    const ID: u32 = 106u32;
24049    const NAME: &'static str = "OPTICAL_FLOW_RAD";
24050    const EXTRA_CRC: u8 = 138u8;
24051    const ENCODED_LEN: usize = 44usize;
24052    fn deser(
24053        _version: MavlinkVersion,
24054        __input: &[u8],
24055    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24056        let avail_len = __input.len();
24057        let mut payload_buf = [0; Self::ENCODED_LEN];
24058        let mut buf = if avail_len < Self::ENCODED_LEN {
24059            payload_buf[0..avail_len].copy_from_slice(__input);
24060            Bytes::new(&payload_buf)
24061        } else {
24062            Bytes::new(__input)
24063        };
24064        let mut __struct = Self::default();
24065        __struct.time_usec = buf.get_u64_le();
24066        __struct.integration_time_us = buf.get_u32_le();
24067        __struct.integrated_x = buf.get_f32_le();
24068        __struct.integrated_y = buf.get_f32_le();
24069        __struct.integrated_xgyro = buf.get_f32_le();
24070        __struct.integrated_ygyro = buf.get_f32_le();
24071        __struct.integrated_zgyro = buf.get_f32_le();
24072        __struct.time_delta_distance_us = buf.get_u32_le();
24073        __struct.distance = buf.get_f32_le();
24074        __struct.temperature = buf.get_i16_le();
24075        __struct.sensor_id = buf.get_u8();
24076        __struct.quality = buf.get_u8();
24077        Ok(__struct)
24078    }
24079    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24080        let mut __tmp = BytesMut::new(bytes);
24081        #[allow(clippy::absurd_extreme_comparisons)]
24082        #[allow(unused_comparisons)]
24083        if __tmp.remaining() < Self::ENCODED_LEN {
24084            panic!(
24085                "buffer is too small (need {} bytes, but got {})",
24086                Self::ENCODED_LEN,
24087                __tmp.remaining(),
24088            )
24089        }
24090        __tmp.put_u64_le(self.time_usec);
24091        __tmp.put_u32_le(self.integration_time_us);
24092        __tmp.put_f32_le(self.integrated_x);
24093        __tmp.put_f32_le(self.integrated_y);
24094        __tmp.put_f32_le(self.integrated_xgyro);
24095        __tmp.put_f32_le(self.integrated_ygyro);
24096        __tmp.put_f32_le(self.integrated_zgyro);
24097        __tmp.put_u32_le(self.time_delta_distance_us);
24098        __tmp.put_f32_le(self.distance);
24099        __tmp.put_i16_le(self.temperature);
24100        __tmp.put_u8(self.sensor_id);
24101        __tmp.put_u8(self.quality);
24102        if matches!(version, MavlinkVersion::V2) {
24103            let len = __tmp.len();
24104            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24105        } else {
24106            __tmp.len()
24107        }
24108    }
24109}
24110#[doc = "Vehicle status report that is sent out while orbit execution is in progress (see MAV_CMD_DO_ORBIT)."]
24111#[doc = ""]
24112#[doc = "ID: 360"]
24113#[derive(Debug, Clone, PartialEq)]
24114#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24115#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24116#[cfg_attr(feature = "ts", derive(TS))]
24117#[cfg_attr(feature = "ts", ts(export))]
24118pub struct ORBIT_EXECUTION_STATUS_DATA {
24119    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
24120    pub time_usec: u64,
24121    #[doc = "Radius of the orbit circle. Positive values orbit clockwise, negative values orbit counter-clockwise."]
24122    pub radius: f32,
24123    #[doc = "X coordinate of center point. Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7."]
24124    pub x: i32,
24125    #[doc = "Y coordinate of center point.  Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7."]
24126    pub y: i32,
24127    #[doc = "Altitude of center point. Coordinate system depends on frame field."]
24128    pub z: f32,
24129    #[doc = "The coordinate system of the fields: x, y, z."]
24130    pub frame: MavFrame,
24131}
24132impl ORBIT_EXECUTION_STATUS_DATA {
24133    pub const ENCODED_LEN: usize = 25usize;
24134    pub const DEFAULT: Self = Self {
24135        time_usec: 0_u64,
24136        radius: 0.0_f32,
24137        x: 0_i32,
24138        y: 0_i32,
24139        z: 0.0_f32,
24140        frame: MavFrame::DEFAULT,
24141    };
24142    #[cfg(feature = "arbitrary")]
24143    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24144        use arbitrary::{Arbitrary, Unstructured};
24145        let mut buf = [0u8; 1024];
24146        rng.fill_bytes(&mut buf);
24147        let mut unstructured = Unstructured::new(&buf);
24148        Self::arbitrary(&mut unstructured).unwrap_or_default()
24149    }
24150}
24151impl Default for ORBIT_EXECUTION_STATUS_DATA {
24152    fn default() -> Self {
24153        Self::DEFAULT.clone()
24154    }
24155}
24156impl MessageData for ORBIT_EXECUTION_STATUS_DATA {
24157    type Message = MavMessage;
24158    const ID: u32 = 360u32;
24159    const NAME: &'static str = "ORBIT_EXECUTION_STATUS";
24160    const EXTRA_CRC: u8 = 11u8;
24161    const ENCODED_LEN: usize = 25usize;
24162    fn deser(
24163        _version: MavlinkVersion,
24164        __input: &[u8],
24165    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24166        let avail_len = __input.len();
24167        let mut payload_buf = [0; Self::ENCODED_LEN];
24168        let mut buf = if avail_len < Self::ENCODED_LEN {
24169            payload_buf[0..avail_len].copy_from_slice(__input);
24170            Bytes::new(&payload_buf)
24171        } else {
24172            Bytes::new(__input)
24173        };
24174        let mut __struct = Self::default();
24175        __struct.time_usec = buf.get_u64_le();
24176        __struct.radius = buf.get_f32_le();
24177        __struct.x = buf.get_i32_le();
24178        __struct.y = buf.get_i32_le();
24179        __struct.z = buf.get_f32_le();
24180        let tmp = buf.get_u8();
24181        __struct.frame =
24182            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24183                enum_type: "MavFrame",
24184                value: tmp as u32,
24185            })?;
24186        Ok(__struct)
24187    }
24188    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24189        let mut __tmp = BytesMut::new(bytes);
24190        #[allow(clippy::absurd_extreme_comparisons)]
24191        #[allow(unused_comparisons)]
24192        if __tmp.remaining() < Self::ENCODED_LEN {
24193            panic!(
24194                "buffer is too small (need {} bytes, but got {})",
24195                Self::ENCODED_LEN,
24196                __tmp.remaining(),
24197            )
24198        }
24199        __tmp.put_u64_le(self.time_usec);
24200        __tmp.put_f32_le(self.radius);
24201        __tmp.put_i32_le(self.x);
24202        __tmp.put_i32_le(self.y);
24203        __tmp.put_f32_le(self.z);
24204        __tmp.put_u8(self.frame as u8);
24205        if matches!(version, MavlinkVersion::V2) {
24206            let len = __tmp.len();
24207            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24208        } else {
24209            __tmp.len()
24210        }
24211    }
24212}
24213#[doc = "Response from a PARAM_EXT_SET message."]
24214#[doc = ""]
24215#[doc = "ID: 324"]
24216#[derive(Debug, Clone, PartialEq)]
24217#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24218#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24219#[cfg_attr(feature = "ts", derive(TS))]
24220#[cfg_attr(feature = "ts", ts(export))]
24221pub struct PARAM_EXT_ACK_DATA {
24222    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24223    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24224    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
24225    pub param_id: [u8; 16],
24226    #[doc = "Parameter value (new value if PARAM_ACK_ACCEPTED, current value otherwise)"]
24227    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24228    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
24229    pub param_value: [u8; 128],
24230    #[doc = "Parameter type."]
24231    pub param_type: MavParamExtType,
24232    #[doc = "Result code."]
24233    pub param_result: ParamAck,
24234}
24235impl PARAM_EXT_ACK_DATA {
24236    pub const ENCODED_LEN: usize = 146usize;
24237    pub const DEFAULT: Self = Self {
24238        param_id: [0_u8; 16usize],
24239        param_value: [0_u8; 128usize],
24240        param_type: MavParamExtType::DEFAULT,
24241        param_result: ParamAck::DEFAULT,
24242    };
24243    #[cfg(feature = "arbitrary")]
24244    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24245        use arbitrary::{Arbitrary, Unstructured};
24246        let mut buf = [0u8; 1024];
24247        rng.fill_bytes(&mut buf);
24248        let mut unstructured = Unstructured::new(&buf);
24249        Self::arbitrary(&mut unstructured).unwrap_or_default()
24250    }
24251}
24252impl Default for PARAM_EXT_ACK_DATA {
24253    fn default() -> Self {
24254        Self::DEFAULT.clone()
24255    }
24256}
24257impl MessageData for PARAM_EXT_ACK_DATA {
24258    type Message = MavMessage;
24259    const ID: u32 = 324u32;
24260    const NAME: &'static str = "PARAM_EXT_ACK";
24261    const EXTRA_CRC: u8 = 132u8;
24262    const ENCODED_LEN: usize = 146usize;
24263    fn deser(
24264        _version: MavlinkVersion,
24265        __input: &[u8],
24266    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24267        let avail_len = __input.len();
24268        let mut payload_buf = [0; Self::ENCODED_LEN];
24269        let mut buf = if avail_len < Self::ENCODED_LEN {
24270            payload_buf[0..avail_len].copy_from_slice(__input);
24271            Bytes::new(&payload_buf)
24272        } else {
24273            Bytes::new(__input)
24274        };
24275        let mut __struct = Self::default();
24276        for v in &mut __struct.param_id {
24277            let val = buf.get_u8();
24278            *v = val;
24279        }
24280        for v in &mut __struct.param_value {
24281            let val = buf.get_u8();
24282            *v = val;
24283        }
24284        let tmp = buf.get_u8();
24285        __struct.param_type =
24286            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24287                enum_type: "MavParamExtType",
24288                value: tmp as u32,
24289            })?;
24290        let tmp = buf.get_u8();
24291        __struct.param_result =
24292            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24293                enum_type: "ParamAck",
24294                value: tmp as u32,
24295            })?;
24296        Ok(__struct)
24297    }
24298    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24299        let mut __tmp = BytesMut::new(bytes);
24300        #[allow(clippy::absurd_extreme_comparisons)]
24301        #[allow(unused_comparisons)]
24302        if __tmp.remaining() < Self::ENCODED_LEN {
24303            panic!(
24304                "buffer is too small (need {} bytes, but got {})",
24305                Self::ENCODED_LEN,
24306                __tmp.remaining(),
24307            )
24308        }
24309        for val in &self.param_id {
24310            __tmp.put_u8(*val);
24311        }
24312        for val in &self.param_value {
24313            __tmp.put_u8(*val);
24314        }
24315        __tmp.put_u8(self.param_type as u8);
24316        __tmp.put_u8(self.param_result as u8);
24317        if matches!(version, MavlinkVersion::V2) {
24318            let len = __tmp.len();
24319            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24320        } else {
24321            __tmp.len()
24322        }
24323    }
24324}
24325#[doc = "Request all parameters of this component. All parameters should be emitted in response as PARAM_EXT_VALUE."]
24326#[doc = ""]
24327#[doc = "ID: 321"]
24328#[derive(Debug, Clone, PartialEq)]
24329#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24330#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24331#[cfg_attr(feature = "ts", derive(TS))]
24332#[cfg_attr(feature = "ts", ts(export))]
24333pub struct PARAM_EXT_REQUEST_LIST_DATA {
24334    #[doc = "System ID"]
24335    pub target_system: u8,
24336    #[doc = "Component ID"]
24337    pub target_component: u8,
24338}
24339impl PARAM_EXT_REQUEST_LIST_DATA {
24340    pub const ENCODED_LEN: usize = 2usize;
24341    pub const DEFAULT: Self = Self {
24342        target_system: 0_u8,
24343        target_component: 0_u8,
24344    };
24345    #[cfg(feature = "arbitrary")]
24346    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24347        use arbitrary::{Arbitrary, Unstructured};
24348        let mut buf = [0u8; 1024];
24349        rng.fill_bytes(&mut buf);
24350        let mut unstructured = Unstructured::new(&buf);
24351        Self::arbitrary(&mut unstructured).unwrap_or_default()
24352    }
24353}
24354impl Default for PARAM_EXT_REQUEST_LIST_DATA {
24355    fn default() -> Self {
24356        Self::DEFAULT.clone()
24357    }
24358}
24359impl MessageData for PARAM_EXT_REQUEST_LIST_DATA {
24360    type Message = MavMessage;
24361    const ID: u32 = 321u32;
24362    const NAME: &'static str = "PARAM_EXT_REQUEST_LIST";
24363    const EXTRA_CRC: u8 = 88u8;
24364    const ENCODED_LEN: usize = 2usize;
24365    fn deser(
24366        _version: MavlinkVersion,
24367        __input: &[u8],
24368    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24369        let avail_len = __input.len();
24370        let mut payload_buf = [0; Self::ENCODED_LEN];
24371        let mut buf = if avail_len < Self::ENCODED_LEN {
24372            payload_buf[0..avail_len].copy_from_slice(__input);
24373            Bytes::new(&payload_buf)
24374        } else {
24375            Bytes::new(__input)
24376        };
24377        let mut __struct = Self::default();
24378        __struct.target_system = buf.get_u8();
24379        __struct.target_component = buf.get_u8();
24380        Ok(__struct)
24381    }
24382    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24383        let mut __tmp = BytesMut::new(bytes);
24384        #[allow(clippy::absurd_extreme_comparisons)]
24385        #[allow(unused_comparisons)]
24386        if __tmp.remaining() < Self::ENCODED_LEN {
24387            panic!(
24388                "buffer is too small (need {} bytes, but got {})",
24389                Self::ENCODED_LEN,
24390                __tmp.remaining(),
24391            )
24392        }
24393        __tmp.put_u8(self.target_system);
24394        __tmp.put_u8(self.target_component);
24395        if matches!(version, MavlinkVersion::V2) {
24396            let len = __tmp.len();
24397            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24398        } else {
24399            __tmp.len()
24400        }
24401    }
24402}
24403#[doc = "Request to read the value of a parameter with either the param_id string id or param_index. PARAM_EXT_VALUE should be emitted in response."]
24404#[doc = ""]
24405#[doc = "ID: 320"]
24406#[derive(Debug, Clone, PartialEq)]
24407#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24408#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24409#[cfg_attr(feature = "ts", derive(TS))]
24410#[cfg_attr(feature = "ts", ts(export))]
24411pub struct PARAM_EXT_REQUEST_READ_DATA {
24412    #[doc = "Parameter index. Set to -1 to use the Parameter ID field as identifier (else param_id will be ignored)"]
24413    pub param_index: i16,
24414    #[doc = "System ID"]
24415    pub target_system: u8,
24416    #[doc = "Component ID"]
24417    pub target_component: u8,
24418    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24419    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24420    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
24421    pub param_id: [u8; 16],
24422}
24423impl PARAM_EXT_REQUEST_READ_DATA {
24424    pub const ENCODED_LEN: usize = 20usize;
24425    pub const DEFAULT: Self = Self {
24426        param_index: 0_i16,
24427        target_system: 0_u8,
24428        target_component: 0_u8,
24429        param_id: [0_u8; 16usize],
24430    };
24431    #[cfg(feature = "arbitrary")]
24432    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24433        use arbitrary::{Arbitrary, Unstructured};
24434        let mut buf = [0u8; 1024];
24435        rng.fill_bytes(&mut buf);
24436        let mut unstructured = Unstructured::new(&buf);
24437        Self::arbitrary(&mut unstructured).unwrap_or_default()
24438    }
24439}
24440impl Default for PARAM_EXT_REQUEST_READ_DATA {
24441    fn default() -> Self {
24442        Self::DEFAULT.clone()
24443    }
24444}
24445impl MessageData for PARAM_EXT_REQUEST_READ_DATA {
24446    type Message = MavMessage;
24447    const ID: u32 = 320u32;
24448    const NAME: &'static str = "PARAM_EXT_REQUEST_READ";
24449    const EXTRA_CRC: u8 = 243u8;
24450    const ENCODED_LEN: usize = 20usize;
24451    fn deser(
24452        _version: MavlinkVersion,
24453        __input: &[u8],
24454    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24455        let avail_len = __input.len();
24456        let mut payload_buf = [0; Self::ENCODED_LEN];
24457        let mut buf = if avail_len < Self::ENCODED_LEN {
24458            payload_buf[0..avail_len].copy_from_slice(__input);
24459            Bytes::new(&payload_buf)
24460        } else {
24461            Bytes::new(__input)
24462        };
24463        let mut __struct = Self::default();
24464        __struct.param_index = buf.get_i16_le();
24465        __struct.target_system = buf.get_u8();
24466        __struct.target_component = buf.get_u8();
24467        for v in &mut __struct.param_id {
24468            let val = buf.get_u8();
24469            *v = val;
24470        }
24471        Ok(__struct)
24472    }
24473    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24474        let mut __tmp = BytesMut::new(bytes);
24475        #[allow(clippy::absurd_extreme_comparisons)]
24476        #[allow(unused_comparisons)]
24477        if __tmp.remaining() < Self::ENCODED_LEN {
24478            panic!(
24479                "buffer is too small (need {} bytes, but got {})",
24480                Self::ENCODED_LEN,
24481                __tmp.remaining(),
24482            )
24483        }
24484        __tmp.put_i16_le(self.param_index);
24485        __tmp.put_u8(self.target_system);
24486        __tmp.put_u8(self.target_component);
24487        for val in &self.param_id {
24488            __tmp.put_u8(*val);
24489        }
24490        if matches!(version, MavlinkVersion::V2) {
24491            let len = __tmp.len();
24492            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24493        } else {
24494            __tmp.len()
24495        }
24496    }
24497}
24498#[doc = "Set a parameter value. In order to deal with message loss (and retransmission of PARAM_EXT_SET), when setting a parameter value and the new value is the same as the current value, you will immediately get a PARAM_ACK_ACCEPTED response. If the current state is PARAM_ACK_IN_PROGRESS, you will accordingly receive a PARAM_ACK_IN_PROGRESS in response."]
24499#[doc = ""]
24500#[doc = "ID: 323"]
24501#[derive(Debug, Clone, PartialEq)]
24502#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24503#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24504#[cfg_attr(feature = "ts", derive(TS))]
24505#[cfg_attr(feature = "ts", ts(export))]
24506pub struct PARAM_EXT_SET_DATA {
24507    #[doc = "System ID"]
24508    pub target_system: u8,
24509    #[doc = "Component ID"]
24510    pub target_component: u8,
24511    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24512    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24513    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
24514    pub param_id: [u8; 16],
24515    #[doc = "Parameter value"]
24516    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24517    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
24518    pub param_value: [u8; 128],
24519    #[doc = "Parameter type."]
24520    pub param_type: MavParamExtType,
24521}
24522impl PARAM_EXT_SET_DATA {
24523    pub const ENCODED_LEN: usize = 147usize;
24524    pub const DEFAULT: Self = Self {
24525        target_system: 0_u8,
24526        target_component: 0_u8,
24527        param_id: [0_u8; 16usize],
24528        param_value: [0_u8; 128usize],
24529        param_type: MavParamExtType::DEFAULT,
24530    };
24531    #[cfg(feature = "arbitrary")]
24532    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24533        use arbitrary::{Arbitrary, Unstructured};
24534        let mut buf = [0u8; 1024];
24535        rng.fill_bytes(&mut buf);
24536        let mut unstructured = Unstructured::new(&buf);
24537        Self::arbitrary(&mut unstructured).unwrap_or_default()
24538    }
24539}
24540impl Default for PARAM_EXT_SET_DATA {
24541    fn default() -> Self {
24542        Self::DEFAULT.clone()
24543    }
24544}
24545impl MessageData for PARAM_EXT_SET_DATA {
24546    type Message = MavMessage;
24547    const ID: u32 = 323u32;
24548    const NAME: &'static str = "PARAM_EXT_SET";
24549    const EXTRA_CRC: u8 = 78u8;
24550    const ENCODED_LEN: usize = 147usize;
24551    fn deser(
24552        _version: MavlinkVersion,
24553        __input: &[u8],
24554    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24555        let avail_len = __input.len();
24556        let mut payload_buf = [0; Self::ENCODED_LEN];
24557        let mut buf = if avail_len < Self::ENCODED_LEN {
24558            payload_buf[0..avail_len].copy_from_slice(__input);
24559            Bytes::new(&payload_buf)
24560        } else {
24561            Bytes::new(__input)
24562        };
24563        let mut __struct = Self::default();
24564        __struct.target_system = buf.get_u8();
24565        __struct.target_component = buf.get_u8();
24566        for v in &mut __struct.param_id {
24567            let val = buf.get_u8();
24568            *v = val;
24569        }
24570        for v in &mut __struct.param_value {
24571            let val = buf.get_u8();
24572            *v = val;
24573        }
24574        let tmp = buf.get_u8();
24575        __struct.param_type =
24576            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24577                enum_type: "MavParamExtType",
24578                value: tmp as u32,
24579            })?;
24580        Ok(__struct)
24581    }
24582    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24583        let mut __tmp = BytesMut::new(bytes);
24584        #[allow(clippy::absurd_extreme_comparisons)]
24585        #[allow(unused_comparisons)]
24586        if __tmp.remaining() < Self::ENCODED_LEN {
24587            panic!(
24588                "buffer is too small (need {} bytes, but got {})",
24589                Self::ENCODED_LEN,
24590                __tmp.remaining(),
24591            )
24592        }
24593        __tmp.put_u8(self.target_system);
24594        __tmp.put_u8(self.target_component);
24595        for val in &self.param_id {
24596            __tmp.put_u8(*val);
24597        }
24598        for val in &self.param_value {
24599            __tmp.put_u8(*val);
24600        }
24601        __tmp.put_u8(self.param_type as u8);
24602        if matches!(version, MavlinkVersion::V2) {
24603            let len = __tmp.len();
24604            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24605        } else {
24606            __tmp.len()
24607        }
24608    }
24609}
24610#[doc = "Emit the value of a parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows them to re-request missing parameters after a loss or timeout."]
24611#[doc = ""]
24612#[doc = "ID: 322"]
24613#[derive(Debug, Clone, PartialEq)]
24614#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24615#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24616#[cfg_attr(feature = "ts", derive(TS))]
24617#[cfg_attr(feature = "ts", ts(export))]
24618pub struct PARAM_EXT_VALUE_DATA {
24619    #[doc = "Total number of parameters"]
24620    pub param_count: u16,
24621    #[doc = "Index of this parameter"]
24622    pub param_index: u16,
24623    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24624    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24625    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
24626    pub param_id: [u8; 16],
24627    #[doc = "Parameter value"]
24628    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24629    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
24630    pub param_value: [u8; 128],
24631    #[doc = "Parameter type."]
24632    pub param_type: MavParamExtType,
24633}
24634impl PARAM_EXT_VALUE_DATA {
24635    pub const ENCODED_LEN: usize = 149usize;
24636    pub const DEFAULT: Self = Self {
24637        param_count: 0_u16,
24638        param_index: 0_u16,
24639        param_id: [0_u8; 16usize],
24640        param_value: [0_u8; 128usize],
24641        param_type: MavParamExtType::DEFAULT,
24642    };
24643    #[cfg(feature = "arbitrary")]
24644    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24645        use arbitrary::{Arbitrary, Unstructured};
24646        let mut buf = [0u8; 1024];
24647        rng.fill_bytes(&mut buf);
24648        let mut unstructured = Unstructured::new(&buf);
24649        Self::arbitrary(&mut unstructured).unwrap_or_default()
24650    }
24651}
24652impl Default for PARAM_EXT_VALUE_DATA {
24653    fn default() -> Self {
24654        Self::DEFAULT.clone()
24655    }
24656}
24657impl MessageData for PARAM_EXT_VALUE_DATA {
24658    type Message = MavMessage;
24659    const ID: u32 = 322u32;
24660    const NAME: &'static str = "PARAM_EXT_VALUE";
24661    const EXTRA_CRC: u8 = 243u8;
24662    const ENCODED_LEN: usize = 149usize;
24663    fn deser(
24664        _version: MavlinkVersion,
24665        __input: &[u8],
24666    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24667        let avail_len = __input.len();
24668        let mut payload_buf = [0; Self::ENCODED_LEN];
24669        let mut buf = if avail_len < Self::ENCODED_LEN {
24670            payload_buf[0..avail_len].copy_from_slice(__input);
24671            Bytes::new(&payload_buf)
24672        } else {
24673            Bytes::new(__input)
24674        };
24675        let mut __struct = Self::default();
24676        __struct.param_count = buf.get_u16_le();
24677        __struct.param_index = buf.get_u16_le();
24678        for v in &mut __struct.param_id {
24679            let val = buf.get_u8();
24680            *v = val;
24681        }
24682        for v in &mut __struct.param_value {
24683            let val = buf.get_u8();
24684            *v = val;
24685        }
24686        let tmp = buf.get_u8();
24687        __struct.param_type =
24688            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24689                enum_type: "MavParamExtType",
24690                value: tmp as u32,
24691            })?;
24692        Ok(__struct)
24693    }
24694    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24695        let mut __tmp = BytesMut::new(bytes);
24696        #[allow(clippy::absurd_extreme_comparisons)]
24697        #[allow(unused_comparisons)]
24698        if __tmp.remaining() < Self::ENCODED_LEN {
24699            panic!(
24700                "buffer is too small (need {} bytes, but got {})",
24701                Self::ENCODED_LEN,
24702                __tmp.remaining(),
24703            )
24704        }
24705        __tmp.put_u16_le(self.param_count);
24706        __tmp.put_u16_le(self.param_index);
24707        for val in &self.param_id {
24708            __tmp.put_u8(*val);
24709        }
24710        for val in &self.param_value {
24711            __tmp.put_u8(*val);
24712        }
24713        __tmp.put_u8(self.param_type as u8);
24714        if matches!(version, MavlinkVersion::V2) {
24715            let len = __tmp.len();
24716            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24717        } else {
24718            __tmp.len()
24719        }
24720    }
24721}
24722#[doc = "Bind a RC channel to a parameter. The parameter should change according to the RC channel value."]
24723#[doc = ""]
24724#[doc = "ID: 50"]
24725#[derive(Debug, Clone, PartialEq)]
24726#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24727#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24728#[cfg_attr(feature = "ts", derive(TS))]
24729#[cfg_attr(feature = "ts", ts(export))]
24730pub struct PARAM_MAP_RC_DATA {
24731    #[doc = "Initial parameter value"]
24732    pub param_value0: f32,
24733    #[doc = "Scale, maps the RC range [-1, 1] to a parameter value"]
24734    pub scale: f32,
24735    #[doc = "Minimum param value. The protocol does not define if this overwrites an onboard minimum value. (Depends on implementation)"]
24736    pub param_value_min: f32,
24737    #[doc = "Maximum param value. The protocol does not define if this overwrites an onboard maximum value. (Depends on implementation)"]
24738    pub param_value_max: f32,
24739    #[doc = "Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored), send -2 to disable any existing map for this rc_channel_index."]
24740    pub param_index: i16,
24741    #[doc = "System ID"]
24742    pub target_system: u8,
24743    #[doc = "Component ID"]
24744    pub target_component: u8,
24745    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24746    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24747    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
24748    pub param_id: [u8; 16],
24749    #[doc = "Index of parameter RC channel. Not equal to the RC channel id. Typically corresponds to a potentiometer-knob on the RC."]
24750    pub parameter_rc_channel_index: u8,
24751}
24752impl PARAM_MAP_RC_DATA {
24753    pub const ENCODED_LEN: usize = 37usize;
24754    pub const DEFAULT: Self = Self {
24755        param_value0: 0.0_f32,
24756        scale: 0.0_f32,
24757        param_value_min: 0.0_f32,
24758        param_value_max: 0.0_f32,
24759        param_index: 0_i16,
24760        target_system: 0_u8,
24761        target_component: 0_u8,
24762        param_id: [0_u8; 16usize],
24763        parameter_rc_channel_index: 0_u8,
24764    };
24765    #[cfg(feature = "arbitrary")]
24766    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24767        use arbitrary::{Arbitrary, Unstructured};
24768        let mut buf = [0u8; 1024];
24769        rng.fill_bytes(&mut buf);
24770        let mut unstructured = Unstructured::new(&buf);
24771        Self::arbitrary(&mut unstructured).unwrap_or_default()
24772    }
24773}
24774impl Default for PARAM_MAP_RC_DATA {
24775    fn default() -> Self {
24776        Self::DEFAULT.clone()
24777    }
24778}
24779impl MessageData for PARAM_MAP_RC_DATA {
24780    type Message = MavMessage;
24781    const ID: u32 = 50u32;
24782    const NAME: &'static str = "PARAM_MAP_RC";
24783    const EXTRA_CRC: u8 = 78u8;
24784    const ENCODED_LEN: usize = 37usize;
24785    fn deser(
24786        _version: MavlinkVersion,
24787        __input: &[u8],
24788    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24789        let avail_len = __input.len();
24790        let mut payload_buf = [0; Self::ENCODED_LEN];
24791        let mut buf = if avail_len < Self::ENCODED_LEN {
24792            payload_buf[0..avail_len].copy_from_slice(__input);
24793            Bytes::new(&payload_buf)
24794        } else {
24795            Bytes::new(__input)
24796        };
24797        let mut __struct = Self::default();
24798        __struct.param_value0 = buf.get_f32_le();
24799        __struct.scale = buf.get_f32_le();
24800        __struct.param_value_min = buf.get_f32_le();
24801        __struct.param_value_max = buf.get_f32_le();
24802        __struct.param_index = buf.get_i16_le();
24803        __struct.target_system = buf.get_u8();
24804        __struct.target_component = buf.get_u8();
24805        for v in &mut __struct.param_id {
24806            let val = buf.get_u8();
24807            *v = val;
24808        }
24809        __struct.parameter_rc_channel_index = buf.get_u8();
24810        Ok(__struct)
24811    }
24812    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24813        let mut __tmp = BytesMut::new(bytes);
24814        #[allow(clippy::absurd_extreme_comparisons)]
24815        #[allow(unused_comparisons)]
24816        if __tmp.remaining() < Self::ENCODED_LEN {
24817            panic!(
24818                "buffer is too small (need {} bytes, but got {})",
24819                Self::ENCODED_LEN,
24820                __tmp.remaining(),
24821            )
24822        }
24823        __tmp.put_f32_le(self.param_value0);
24824        __tmp.put_f32_le(self.scale);
24825        __tmp.put_f32_le(self.param_value_min);
24826        __tmp.put_f32_le(self.param_value_max);
24827        __tmp.put_i16_le(self.param_index);
24828        __tmp.put_u8(self.target_system);
24829        __tmp.put_u8(self.target_component);
24830        for val in &self.param_id {
24831            __tmp.put_u8(*val);
24832        }
24833        __tmp.put_u8(self.parameter_rc_channel_index);
24834        if matches!(version, MavlinkVersion::V2) {
24835            let len = __tmp.len();
24836            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24837        } else {
24838            __tmp.len()
24839        }
24840    }
24841}
24842#[doc = "Request all parameters of this component. After this request, all parameters are emitted. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
24843#[doc = ""]
24844#[doc = "ID: 21"]
24845#[derive(Debug, Clone, PartialEq)]
24846#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24847#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24848#[cfg_attr(feature = "ts", derive(TS))]
24849#[cfg_attr(feature = "ts", ts(export))]
24850pub struct PARAM_REQUEST_LIST_DATA {
24851    #[doc = "System ID"]
24852    pub target_system: u8,
24853    #[doc = "Component ID"]
24854    pub target_component: u8,
24855}
24856impl PARAM_REQUEST_LIST_DATA {
24857    pub const ENCODED_LEN: usize = 2usize;
24858    pub const DEFAULT: Self = Self {
24859        target_system: 0_u8,
24860        target_component: 0_u8,
24861    };
24862    #[cfg(feature = "arbitrary")]
24863    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24864        use arbitrary::{Arbitrary, Unstructured};
24865        let mut buf = [0u8; 1024];
24866        rng.fill_bytes(&mut buf);
24867        let mut unstructured = Unstructured::new(&buf);
24868        Self::arbitrary(&mut unstructured).unwrap_or_default()
24869    }
24870}
24871impl Default for PARAM_REQUEST_LIST_DATA {
24872    fn default() -> Self {
24873        Self::DEFAULT.clone()
24874    }
24875}
24876impl MessageData for PARAM_REQUEST_LIST_DATA {
24877    type Message = MavMessage;
24878    const ID: u32 = 21u32;
24879    const NAME: &'static str = "PARAM_REQUEST_LIST";
24880    const EXTRA_CRC: u8 = 159u8;
24881    const ENCODED_LEN: usize = 2usize;
24882    fn deser(
24883        _version: MavlinkVersion,
24884        __input: &[u8],
24885    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24886        let avail_len = __input.len();
24887        let mut payload_buf = [0; Self::ENCODED_LEN];
24888        let mut buf = if avail_len < Self::ENCODED_LEN {
24889            payload_buf[0..avail_len].copy_from_slice(__input);
24890            Bytes::new(&payload_buf)
24891        } else {
24892            Bytes::new(__input)
24893        };
24894        let mut __struct = Self::default();
24895        __struct.target_system = buf.get_u8();
24896        __struct.target_component = buf.get_u8();
24897        Ok(__struct)
24898    }
24899    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24900        let mut __tmp = BytesMut::new(bytes);
24901        #[allow(clippy::absurd_extreme_comparisons)]
24902        #[allow(unused_comparisons)]
24903        if __tmp.remaining() < Self::ENCODED_LEN {
24904            panic!(
24905                "buffer is too small (need {} bytes, but got {})",
24906                Self::ENCODED_LEN,
24907                __tmp.remaining(),
24908            )
24909        }
24910        __tmp.put_u8(self.target_system);
24911        __tmp.put_u8(self.target_component);
24912        if matches!(version, MavlinkVersion::V2) {
24913            let len = __tmp.len();
24914            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24915        } else {
24916            __tmp.len()
24917        }
24918    }
24919}
24920#[doc = "value[float]. This allows to send a parameter to any other component (such as the GCS) without the need of previous knowledge of possible parameter names. Thus the same GCS can store different parameters for different autopilots. See also <https://mavlink.io/en/services/parameter.html> for a full documentation of QGroundControl and IMU code."]
24921#[doc = ""]
24922#[doc = "ID: 20"]
24923#[derive(Debug, Clone, PartialEq)]
24924#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24925#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24926#[cfg_attr(feature = "ts", derive(TS))]
24927#[cfg_attr(feature = "ts", ts(export))]
24928pub struct PARAM_REQUEST_READ_DATA {
24929    #[doc = "Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored)"]
24930    pub param_index: i16,
24931    #[doc = "System ID"]
24932    pub target_system: u8,
24933    #[doc = "Component ID"]
24934    pub target_component: u8,
24935    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24936    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24937    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
24938    pub param_id: [u8; 16],
24939}
24940impl PARAM_REQUEST_READ_DATA {
24941    pub const ENCODED_LEN: usize = 20usize;
24942    pub const DEFAULT: Self = Self {
24943        param_index: 0_i16,
24944        target_system: 0_u8,
24945        target_component: 0_u8,
24946        param_id: [0_u8; 16usize],
24947    };
24948    #[cfg(feature = "arbitrary")]
24949    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24950        use arbitrary::{Arbitrary, Unstructured};
24951        let mut buf = [0u8; 1024];
24952        rng.fill_bytes(&mut buf);
24953        let mut unstructured = Unstructured::new(&buf);
24954        Self::arbitrary(&mut unstructured).unwrap_or_default()
24955    }
24956}
24957impl Default for PARAM_REQUEST_READ_DATA {
24958    fn default() -> Self {
24959        Self::DEFAULT.clone()
24960    }
24961}
24962impl MessageData for PARAM_REQUEST_READ_DATA {
24963    type Message = MavMessage;
24964    const ID: u32 = 20u32;
24965    const NAME: &'static str = "PARAM_REQUEST_READ";
24966    const EXTRA_CRC: u8 = 214u8;
24967    const ENCODED_LEN: usize = 20usize;
24968    fn deser(
24969        _version: MavlinkVersion,
24970        __input: &[u8],
24971    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24972        let avail_len = __input.len();
24973        let mut payload_buf = [0; Self::ENCODED_LEN];
24974        let mut buf = if avail_len < Self::ENCODED_LEN {
24975            payload_buf[0..avail_len].copy_from_slice(__input);
24976            Bytes::new(&payload_buf)
24977        } else {
24978            Bytes::new(__input)
24979        };
24980        let mut __struct = Self::default();
24981        __struct.param_index = buf.get_i16_le();
24982        __struct.target_system = buf.get_u8();
24983        __struct.target_component = buf.get_u8();
24984        for v in &mut __struct.param_id {
24985            let val = buf.get_u8();
24986            *v = val;
24987        }
24988        Ok(__struct)
24989    }
24990    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24991        let mut __tmp = BytesMut::new(bytes);
24992        #[allow(clippy::absurd_extreme_comparisons)]
24993        #[allow(unused_comparisons)]
24994        if __tmp.remaining() < Self::ENCODED_LEN {
24995            panic!(
24996                "buffer is too small (need {} bytes, but got {})",
24997                Self::ENCODED_LEN,
24998                __tmp.remaining(),
24999            )
25000        }
25001        __tmp.put_i16_le(self.param_index);
25002        __tmp.put_u8(self.target_system);
25003        __tmp.put_u8(self.target_component);
25004        for val in &self.param_id {
25005            __tmp.put_u8(*val);
25006        }
25007        if matches!(version, MavlinkVersion::V2) {
25008            let len = __tmp.len();
25009            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25010        } else {
25011            __tmp.len()
25012        }
25013    }
25014}
25015#[doc = "Set a parameter value (write new value to permanent storage).         The receiving component should acknowledge the new parameter value by broadcasting a PARAM_VALUE message (broadcasting ensures that multiple GCS all have an up-to-date list of all parameters). If the sending GCS did not receive a PARAM_VALUE within its timeout time, it should re-send the PARAM_SET message. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
25016#[doc = ""]
25017#[doc = "ID: 23"]
25018#[derive(Debug, Clone, PartialEq)]
25019#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25020#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25021#[cfg_attr(feature = "ts", derive(TS))]
25022#[cfg_attr(feature = "ts", ts(export))]
25023pub struct PARAM_SET_DATA {
25024    #[doc = "Onboard parameter value"]
25025    pub param_value: f32,
25026    #[doc = "System ID"]
25027    pub target_system: u8,
25028    #[doc = "Component ID"]
25029    pub target_component: u8,
25030    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
25031    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
25032    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
25033    pub param_id: [u8; 16],
25034    #[doc = "Onboard parameter type."]
25035    pub param_type: MavParamType,
25036}
25037impl PARAM_SET_DATA {
25038    pub const ENCODED_LEN: usize = 23usize;
25039    pub const DEFAULT: Self = Self {
25040        param_value: 0.0_f32,
25041        target_system: 0_u8,
25042        target_component: 0_u8,
25043        param_id: [0_u8; 16usize],
25044        param_type: MavParamType::DEFAULT,
25045    };
25046    #[cfg(feature = "arbitrary")]
25047    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25048        use arbitrary::{Arbitrary, Unstructured};
25049        let mut buf = [0u8; 1024];
25050        rng.fill_bytes(&mut buf);
25051        let mut unstructured = Unstructured::new(&buf);
25052        Self::arbitrary(&mut unstructured).unwrap_or_default()
25053    }
25054}
25055impl Default for PARAM_SET_DATA {
25056    fn default() -> Self {
25057        Self::DEFAULT.clone()
25058    }
25059}
25060impl MessageData for PARAM_SET_DATA {
25061    type Message = MavMessage;
25062    const ID: u32 = 23u32;
25063    const NAME: &'static str = "PARAM_SET";
25064    const EXTRA_CRC: u8 = 168u8;
25065    const ENCODED_LEN: usize = 23usize;
25066    fn deser(
25067        _version: MavlinkVersion,
25068        __input: &[u8],
25069    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25070        let avail_len = __input.len();
25071        let mut payload_buf = [0; Self::ENCODED_LEN];
25072        let mut buf = if avail_len < Self::ENCODED_LEN {
25073            payload_buf[0..avail_len].copy_from_slice(__input);
25074            Bytes::new(&payload_buf)
25075        } else {
25076            Bytes::new(__input)
25077        };
25078        let mut __struct = Self::default();
25079        __struct.param_value = buf.get_f32_le();
25080        __struct.target_system = buf.get_u8();
25081        __struct.target_component = buf.get_u8();
25082        for v in &mut __struct.param_id {
25083            let val = buf.get_u8();
25084            *v = val;
25085        }
25086        let tmp = buf.get_u8();
25087        __struct.param_type =
25088            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
25089                enum_type: "MavParamType",
25090                value: tmp as u32,
25091            })?;
25092        Ok(__struct)
25093    }
25094    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25095        let mut __tmp = BytesMut::new(bytes);
25096        #[allow(clippy::absurd_extreme_comparisons)]
25097        #[allow(unused_comparisons)]
25098        if __tmp.remaining() < Self::ENCODED_LEN {
25099            panic!(
25100                "buffer is too small (need {} bytes, but got {})",
25101                Self::ENCODED_LEN,
25102                __tmp.remaining(),
25103            )
25104        }
25105        __tmp.put_f32_le(self.param_value);
25106        __tmp.put_u8(self.target_system);
25107        __tmp.put_u8(self.target_component);
25108        for val in &self.param_id {
25109            __tmp.put_u8(*val);
25110        }
25111        __tmp.put_u8(self.param_type as u8);
25112        if matches!(version, MavlinkVersion::V2) {
25113            let len = __tmp.len();
25114            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25115        } else {
25116            __tmp.len()
25117        }
25118    }
25119}
25120#[doc = "Emit the value of a onboard parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows him to re-request missing parameters after a loss or timeout. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
25121#[doc = ""]
25122#[doc = "ID: 22"]
25123#[derive(Debug, Clone, PartialEq)]
25124#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25125#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25126#[cfg_attr(feature = "ts", derive(TS))]
25127#[cfg_attr(feature = "ts", ts(export))]
25128pub struct PARAM_VALUE_DATA {
25129    #[doc = "Onboard parameter value"]
25130    pub param_value: f32,
25131    #[doc = "Total number of onboard parameters"]
25132    pub param_count: u16,
25133    #[doc = "Index of this onboard parameter"]
25134    pub param_index: u16,
25135    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
25136    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
25137    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
25138    pub param_id: [u8; 16],
25139    #[doc = "Onboard parameter type."]
25140    pub param_type: MavParamType,
25141}
25142impl PARAM_VALUE_DATA {
25143    pub const ENCODED_LEN: usize = 25usize;
25144    pub const DEFAULT: Self = Self {
25145        param_value: 0.0_f32,
25146        param_count: 0_u16,
25147        param_index: 0_u16,
25148        param_id: [0_u8; 16usize],
25149        param_type: MavParamType::DEFAULT,
25150    };
25151    #[cfg(feature = "arbitrary")]
25152    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25153        use arbitrary::{Arbitrary, Unstructured};
25154        let mut buf = [0u8; 1024];
25155        rng.fill_bytes(&mut buf);
25156        let mut unstructured = Unstructured::new(&buf);
25157        Self::arbitrary(&mut unstructured).unwrap_or_default()
25158    }
25159}
25160impl Default for PARAM_VALUE_DATA {
25161    fn default() -> Self {
25162        Self::DEFAULT.clone()
25163    }
25164}
25165impl MessageData for PARAM_VALUE_DATA {
25166    type Message = MavMessage;
25167    const ID: u32 = 22u32;
25168    const NAME: &'static str = "PARAM_VALUE";
25169    const EXTRA_CRC: u8 = 220u8;
25170    const ENCODED_LEN: usize = 25usize;
25171    fn deser(
25172        _version: MavlinkVersion,
25173        __input: &[u8],
25174    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25175        let avail_len = __input.len();
25176        let mut payload_buf = [0; Self::ENCODED_LEN];
25177        let mut buf = if avail_len < Self::ENCODED_LEN {
25178            payload_buf[0..avail_len].copy_from_slice(__input);
25179            Bytes::new(&payload_buf)
25180        } else {
25181            Bytes::new(__input)
25182        };
25183        let mut __struct = Self::default();
25184        __struct.param_value = buf.get_f32_le();
25185        __struct.param_count = buf.get_u16_le();
25186        __struct.param_index = buf.get_u16_le();
25187        for v in &mut __struct.param_id {
25188            let val = buf.get_u8();
25189            *v = val;
25190        }
25191        let tmp = buf.get_u8();
25192        __struct.param_type =
25193            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
25194                enum_type: "MavParamType",
25195                value: tmp as u32,
25196            })?;
25197        Ok(__struct)
25198    }
25199    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25200        let mut __tmp = BytesMut::new(bytes);
25201        #[allow(clippy::absurd_extreme_comparisons)]
25202        #[allow(unused_comparisons)]
25203        if __tmp.remaining() < Self::ENCODED_LEN {
25204            panic!(
25205                "buffer is too small (need {} bytes, but got {})",
25206                Self::ENCODED_LEN,
25207                __tmp.remaining(),
25208            )
25209        }
25210        __tmp.put_f32_le(self.param_value);
25211        __tmp.put_u16_le(self.param_count);
25212        __tmp.put_u16_le(self.param_index);
25213        for val in &self.param_id {
25214            __tmp.put_u8(*val);
25215        }
25216        __tmp.put_u8(self.param_type as u8);
25217        if matches!(version, MavlinkVersion::V2) {
25218            let len = __tmp.len();
25219            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25220        } else {
25221            __tmp.len()
25222        }
25223    }
25224}
25225#[deprecated = "To be removed / merged with TIMESYNC. See `TIMESYNC` (Deprecated since 2011-08)"]
25226#[doc = "A ping message either requesting or responding to a ping. This allows to measure the system latencies, including serial port, radio modem and UDP connections. The ping microservice is documented at <https://mavlink.io/en/services/ping.html>."]
25227#[doc = ""]
25228#[doc = "ID: 4"]
25229#[derive(Debug, Clone, PartialEq)]
25230#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25231#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25232#[cfg_attr(feature = "ts", derive(TS))]
25233#[cfg_attr(feature = "ts", ts(export))]
25234pub struct PING_DATA {
25235    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
25236    pub time_usec: u64,
25237    #[doc = "PING sequence"]
25238    pub seq: u32,
25239    #[doc = "0: request ping from all receiving systems. If greater than 0: message is a ping response and number is the system id of the requesting system"]
25240    pub target_system: u8,
25241    #[doc = "0: request ping from all receiving components. If greater than 0: message is a ping response and number is the component id of the requesting component."]
25242    pub target_component: u8,
25243}
25244impl PING_DATA {
25245    pub const ENCODED_LEN: usize = 14usize;
25246    pub const DEFAULT: Self = Self {
25247        time_usec: 0_u64,
25248        seq: 0_u32,
25249        target_system: 0_u8,
25250        target_component: 0_u8,
25251    };
25252    #[cfg(feature = "arbitrary")]
25253    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25254        use arbitrary::{Arbitrary, Unstructured};
25255        let mut buf = [0u8; 1024];
25256        rng.fill_bytes(&mut buf);
25257        let mut unstructured = Unstructured::new(&buf);
25258        Self::arbitrary(&mut unstructured).unwrap_or_default()
25259    }
25260}
25261impl Default for PING_DATA {
25262    fn default() -> Self {
25263        Self::DEFAULT.clone()
25264    }
25265}
25266impl MessageData for PING_DATA {
25267    type Message = MavMessage;
25268    const ID: u32 = 4u32;
25269    const NAME: &'static str = "PING";
25270    const EXTRA_CRC: u8 = 237u8;
25271    const ENCODED_LEN: usize = 14usize;
25272    fn deser(
25273        _version: MavlinkVersion,
25274        __input: &[u8],
25275    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25276        let avail_len = __input.len();
25277        let mut payload_buf = [0; Self::ENCODED_LEN];
25278        let mut buf = if avail_len < Self::ENCODED_LEN {
25279            payload_buf[0..avail_len].copy_from_slice(__input);
25280            Bytes::new(&payload_buf)
25281        } else {
25282            Bytes::new(__input)
25283        };
25284        let mut __struct = Self::default();
25285        __struct.time_usec = buf.get_u64_le();
25286        __struct.seq = buf.get_u32_le();
25287        __struct.target_system = buf.get_u8();
25288        __struct.target_component = buf.get_u8();
25289        Ok(__struct)
25290    }
25291    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25292        let mut __tmp = BytesMut::new(bytes);
25293        #[allow(clippy::absurd_extreme_comparisons)]
25294        #[allow(unused_comparisons)]
25295        if __tmp.remaining() < Self::ENCODED_LEN {
25296            panic!(
25297                "buffer is too small (need {} bytes, but got {})",
25298                Self::ENCODED_LEN,
25299                __tmp.remaining(),
25300            )
25301        }
25302        __tmp.put_u64_le(self.time_usec);
25303        __tmp.put_u32_le(self.seq);
25304        __tmp.put_u8(self.target_system);
25305        __tmp.put_u8(self.target_component);
25306        if matches!(version, MavlinkVersion::V2) {
25307            let len = __tmp.len();
25308            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25309        } else {
25310            __tmp.len()
25311        }
25312    }
25313}
25314#[deprecated = "New version explicitly defines format. More interoperable. See `PLAY_TUNE_V2` (Deprecated since 2019-10)"]
25315#[doc = "Control vehicle tone generation (buzzer)."]
25316#[doc = ""]
25317#[doc = "ID: 258"]
25318#[derive(Debug, Clone, PartialEq)]
25319#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25320#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25321#[cfg_attr(feature = "ts", derive(TS))]
25322#[cfg_attr(feature = "ts", ts(export))]
25323pub struct PLAY_TUNE_DATA {
25324    #[doc = "System ID"]
25325    pub target_system: u8,
25326    #[doc = "Component ID"]
25327    pub target_component: u8,
25328    #[doc = "tune in board specific format"]
25329    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
25330    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
25331    pub tune: [u8; 30],
25332    #[doc = "tune extension (appended to tune)"]
25333    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25334    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
25335    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
25336    pub tune2: [u8; 200],
25337}
25338impl PLAY_TUNE_DATA {
25339    pub const ENCODED_LEN: usize = 232usize;
25340    pub const DEFAULT: Self = Self {
25341        target_system: 0_u8,
25342        target_component: 0_u8,
25343        tune: [0_u8; 30usize],
25344        tune2: [0_u8; 200usize],
25345    };
25346    #[cfg(feature = "arbitrary")]
25347    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25348        use arbitrary::{Arbitrary, Unstructured};
25349        let mut buf = [0u8; 1024];
25350        rng.fill_bytes(&mut buf);
25351        let mut unstructured = Unstructured::new(&buf);
25352        Self::arbitrary(&mut unstructured).unwrap_or_default()
25353    }
25354}
25355impl Default for PLAY_TUNE_DATA {
25356    fn default() -> Self {
25357        Self::DEFAULT.clone()
25358    }
25359}
25360impl MessageData for PLAY_TUNE_DATA {
25361    type Message = MavMessage;
25362    const ID: u32 = 258u32;
25363    const NAME: &'static str = "PLAY_TUNE";
25364    const EXTRA_CRC: u8 = 187u8;
25365    const ENCODED_LEN: usize = 232usize;
25366    fn deser(
25367        _version: MavlinkVersion,
25368        __input: &[u8],
25369    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25370        let avail_len = __input.len();
25371        let mut payload_buf = [0; Self::ENCODED_LEN];
25372        let mut buf = if avail_len < Self::ENCODED_LEN {
25373            payload_buf[0..avail_len].copy_from_slice(__input);
25374            Bytes::new(&payload_buf)
25375        } else {
25376            Bytes::new(__input)
25377        };
25378        let mut __struct = Self::default();
25379        __struct.target_system = buf.get_u8();
25380        __struct.target_component = buf.get_u8();
25381        for v in &mut __struct.tune {
25382            let val = buf.get_u8();
25383            *v = val;
25384        }
25385        for v in &mut __struct.tune2 {
25386            let val = buf.get_u8();
25387            *v = val;
25388        }
25389        Ok(__struct)
25390    }
25391    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25392        let mut __tmp = BytesMut::new(bytes);
25393        #[allow(clippy::absurd_extreme_comparisons)]
25394        #[allow(unused_comparisons)]
25395        if __tmp.remaining() < Self::ENCODED_LEN {
25396            panic!(
25397                "buffer is too small (need {} bytes, but got {})",
25398                Self::ENCODED_LEN,
25399                __tmp.remaining(),
25400            )
25401        }
25402        __tmp.put_u8(self.target_system);
25403        __tmp.put_u8(self.target_component);
25404        for val in &self.tune {
25405            __tmp.put_u8(*val);
25406        }
25407        if matches!(version, MavlinkVersion::V2) {
25408            for val in &self.tune2 {
25409                __tmp.put_u8(*val);
25410            }
25411            let len = __tmp.len();
25412            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25413        } else {
25414            __tmp.len()
25415        }
25416    }
25417}
25418#[doc = "Play vehicle tone/tune (buzzer). Supersedes message PLAY_TUNE."]
25419#[doc = ""]
25420#[doc = "ID: 400"]
25421#[derive(Debug, Clone, PartialEq)]
25422#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25423#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25424#[cfg_attr(feature = "ts", derive(TS))]
25425#[cfg_attr(feature = "ts", ts(export))]
25426pub struct PLAY_TUNE_V2_DATA {
25427    #[doc = "Tune format"]
25428    pub format: TuneFormat,
25429    #[doc = "System ID"]
25430    pub target_system: u8,
25431    #[doc = "Component ID"]
25432    pub target_component: u8,
25433    #[doc = "Tune definition as a NULL-terminated string."]
25434    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
25435    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
25436    pub tune: [u8; 248],
25437}
25438impl PLAY_TUNE_V2_DATA {
25439    pub const ENCODED_LEN: usize = 254usize;
25440    pub const DEFAULT: Self = Self {
25441        format: TuneFormat::DEFAULT,
25442        target_system: 0_u8,
25443        target_component: 0_u8,
25444        tune: [0_u8; 248usize],
25445    };
25446    #[cfg(feature = "arbitrary")]
25447    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25448        use arbitrary::{Arbitrary, Unstructured};
25449        let mut buf = [0u8; 1024];
25450        rng.fill_bytes(&mut buf);
25451        let mut unstructured = Unstructured::new(&buf);
25452        Self::arbitrary(&mut unstructured).unwrap_or_default()
25453    }
25454}
25455impl Default for PLAY_TUNE_V2_DATA {
25456    fn default() -> Self {
25457        Self::DEFAULT.clone()
25458    }
25459}
25460impl MessageData for PLAY_TUNE_V2_DATA {
25461    type Message = MavMessage;
25462    const ID: u32 = 400u32;
25463    const NAME: &'static str = "PLAY_TUNE_V2";
25464    const EXTRA_CRC: u8 = 110u8;
25465    const ENCODED_LEN: usize = 254usize;
25466    fn deser(
25467        _version: MavlinkVersion,
25468        __input: &[u8],
25469    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25470        let avail_len = __input.len();
25471        let mut payload_buf = [0; Self::ENCODED_LEN];
25472        let mut buf = if avail_len < Self::ENCODED_LEN {
25473            payload_buf[0..avail_len].copy_from_slice(__input);
25474            Bytes::new(&payload_buf)
25475        } else {
25476            Bytes::new(__input)
25477        };
25478        let mut __struct = Self::default();
25479        let tmp = buf.get_u32_le();
25480        __struct.format = FromPrimitive::from_u32(tmp).ok_or(
25481            ::mavlink_core::error::ParserError::InvalidEnum {
25482                enum_type: "TuneFormat",
25483                value: tmp as u32,
25484            },
25485        )?;
25486        __struct.target_system = buf.get_u8();
25487        __struct.target_component = buf.get_u8();
25488        for v in &mut __struct.tune {
25489            let val = buf.get_u8();
25490            *v = val;
25491        }
25492        Ok(__struct)
25493    }
25494    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25495        let mut __tmp = BytesMut::new(bytes);
25496        #[allow(clippy::absurd_extreme_comparisons)]
25497        #[allow(unused_comparisons)]
25498        if __tmp.remaining() < Self::ENCODED_LEN {
25499            panic!(
25500                "buffer is too small (need {} bytes, but got {})",
25501                Self::ENCODED_LEN,
25502                __tmp.remaining(),
25503            )
25504        }
25505        __tmp.put_u32_le(self.format as u32);
25506        __tmp.put_u8(self.target_system);
25507        __tmp.put_u8(self.target_component);
25508        for val in &self.tune {
25509            __tmp.put_u8(*val);
25510        }
25511        if matches!(version, MavlinkVersion::V2) {
25512            let len = __tmp.len();
25513            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25514        } else {
25515            __tmp.len()
25516        }
25517    }
25518}
25519#[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_GLOBAL_INT if the vehicle is being controlled this way."]
25520#[doc = ""]
25521#[doc = "ID: 87"]
25522#[derive(Debug, Clone, PartialEq)]
25523#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25524#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25525#[cfg_attr(feature = "ts", derive(TS))]
25526#[cfg_attr(feature = "ts", ts(export))]
25527pub struct POSITION_TARGET_GLOBAL_INT_DATA {
25528    #[doc = "Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency."]
25529    pub time_boot_ms: u32,
25530    #[doc = "Latitude in WGS84 frame"]
25531    pub lat_int: i32,
25532    #[doc = "Longitude in WGS84 frame"]
25533    pub lon_int: i32,
25534    #[doc = "Altitude (MSL, AGL or relative to home altitude, depending on frame)"]
25535    pub alt: f32,
25536    #[doc = "X velocity in NED frame"]
25537    pub vx: f32,
25538    #[doc = "Y velocity in NED frame"]
25539    pub vy: f32,
25540    #[doc = "Z velocity in NED frame"]
25541    pub vz: f32,
25542    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
25543    pub afx: f32,
25544    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
25545    pub afy: f32,
25546    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
25547    pub afz: f32,
25548    #[doc = "yaw setpoint"]
25549    pub yaw: f32,
25550    #[doc = "yaw rate setpoint"]
25551    pub yaw_rate: f32,
25552    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
25553    pub type_mask: PositionTargetTypemask,
25554    #[doc = "Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated)"]
25555    pub coordinate_frame: MavFrame,
25556}
25557impl POSITION_TARGET_GLOBAL_INT_DATA {
25558    pub const ENCODED_LEN: usize = 51usize;
25559    pub const DEFAULT: Self = Self {
25560        time_boot_ms: 0_u32,
25561        lat_int: 0_i32,
25562        lon_int: 0_i32,
25563        alt: 0.0_f32,
25564        vx: 0.0_f32,
25565        vy: 0.0_f32,
25566        vz: 0.0_f32,
25567        afx: 0.0_f32,
25568        afy: 0.0_f32,
25569        afz: 0.0_f32,
25570        yaw: 0.0_f32,
25571        yaw_rate: 0.0_f32,
25572        type_mask: PositionTargetTypemask::DEFAULT,
25573        coordinate_frame: MavFrame::DEFAULT,
25574    };
25575    #[cfg(feature = "arbitrary")]
25576    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25577        use arbitrary::{Arbitrary, Unstructured};
25578        let mut buf = [0u8; 1024];
25579        rng.fill_bytes(&mut buf);
25580        let mut unstructured = Unstructured::new(&buf);
25581        Self::arbitrary(&mut unstructured).unwrap_or_default()
25582    }
25583}
25584impl Default for POSITION_TARGET_GLOBAL_INT_DATA {
25585    fn default() -> Self {
25586        Self::DEFAULT.clone()
25587    }
25588}
25589impl MessageData for POSITION_TARGET_GLOBAL_INT_DATA {
25590    type Message = MavMessage;
25591    const ID: u32 = 87u32;
25592    const NAME: &'static str = "POSITION_TARGET_GLOBAL_INT";
25593    const EXTRA_CRC: u8 = 150u8;
25594    const ENCODED_LEN: usize = 51usize;
25595    fn deser(
25596        _version: MavlinkVersion,
25597        __input: &[u8],
25598    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25599        let avail_len = __input.len();
25600        let mut payload_buf = [0; Self::ENCODED_LEN];
25601        let mut buf = if avail_len < Self::ENCODED_LEN {
25602            payload_buf[0..avail_len].copy_from_slice(__input);
25603            Bytes::new(&payload_buf)
25604        } else {
25605            Bytes::new(__input)
25606        };
25607        let mut __struct = Self::default();
25608        __struct.time_boot_ms = buf.get_u32_le();
25609        __struct.lat_int = buf.get_i32_le();
25610        __struct.lon_int = buf.get_i32_le();
25611        __struct.alt = buf.get_f32_le();
25612        __struct.vx = buf.get_f32_le();
25613        __struct.vy = buf.get_f32_le();
25614        __struct.vz = buf.get_f32_le();
25615        __struct.afx = buf.get_f32_le();
25616        __struct.afy = buf.get_f32_le();
25617        __struct.afz = buf.get_f32_le();
25618        __struct.yaw = buf.get_f32_le();
25619        __struct.yaw_rate = buf.get_f32_le();
25620        let tmp = buf.get_u16_le();
25621        __struct.type_mask = PositionTargetTypemask::from_bits(
25622            tmp & PositionTargetTypemask::all().bits(),
25623        )
25624        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
25625            flag_type: "PositionTargetTypemask",
25626            value: tmp as u32,
25627        })?;
25628        let tmp = buf.get_u8();
25629        __struct.coordinate_frame =
25630            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
25631                enum_type: "MavFrame",
25632                value: tmp as u32,
25633            })?;
25634        Ok(__struct)
25635    }
25636    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25637        let mut __tmp = BytesMut::new(bytes);
25638        #[allow(clippy::absurd_extreme_comparisons)]
25639        #[allow(unused_comparisons)]
25640        if __tmp.remaining() < Self::ENCODED_LEN {
25641            panic!(
25642                "buffer is too small (need {} bytes, but got {})",
25643                Self::ENCODED_LEN,
25644                __tmp.remaining(),
25645            )
25646        }
25647        __tmp.put_u32_le(self.time_boot_ms);
25648        __tmp.put_i32_le(self.lat_int);
25649        __tmp.put_i32_le(self.lon_int);
25650        __tmp.put_f32_le(self.alt);
25651        __tmp.put_f32_le(self.vx);
25652        __tmp.put_f32_le(self.vy);
25653        __tmp.put_f32_le(self.vz);
25654        __tmp.put_f32_le(self.afx);
25655        __tmp.put_f32_le(self.afy);
25656        __tmp.put_f32_le(self.afz);
25657        __tmp.put_f32_le(self.yaw);
25658        __tmp.put_f32_le(self.yaw_rate);
25659        __tmp.put_u16_le(self.type_mask.bits());
25660        __tmp.put_u8(self.coordinate_frame as u8);
25661        if matches!(version, MavlinkVersion::V2) {
25662            let len = __tmp.len();
25663            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25664        } else {
25665            __tmp.len()
25666        }
25667    }
25668}
25669#[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_LOCAL_NED if the vehicle is being controlled this way."]
25670#[doc = ""]
25671#[doc = "ID: 85"]
25672#[derive(Debug, Clone, PartialEq)]
25673#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25674#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25675#[cfg_attr(feature = "ts", derive(TS))]
25676#[cfg_attr(feature = "ts", ts(export))]
25677pub struct POSITION_TARGET_LOCAL_NED_DATA {
25678    #[doc = "Timestamp (time since system boot)."]
25679    pub time_boot_ms: u32,
25680    #[doc = "X Position in NED frame"]
25681    pub x: f32,
25682    #[doc = "Y Position in NED frame"]
25683    pub y: f32,
25684    #[doc = "Z Position in NED frame (note, altitude is negative in NED)"]
25685    pub z: f32,
25686    #[doc = "X velocity in NED frame"]
25687    pub vx: f32,
25688    #[doc = "Y velocity in NED frame"]
25689    pub vy: f32,
25690    #[doc = "Z velocity in NED frame"]
25691    pub vz: f32,
25692    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
25693    pub afx: f32,
25694    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
25695    pub afy: f32,
25696    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
25697    pub afz: f32,
25698    #[doc = "yaw setpoint"]
25699    pub yaw: f32,
25700    #[doc = "yaw rate setpoint"]
25701    pub yaw_rate: f32,
25702    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
25703    pub type_mask: PositionTargetTypemask,
25704    #[doc = "Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9"]
25705    pub coordinate_frame: MavFrame,
25706}
25707impl POSITION_TARGET_LOCAL_NED_DATA {
25708    pub const ENCODED_LEN: usize = 51usize;
25709    pub const DEFAULT: Self = Self {
25710        time_boot_ms: 0_u32,
25711        x: 0.0_f32,
25712        y: 0.0_f32,
25713        z: 0.0_f32,
25714        vx: 0.0_f32,
25715        vy: 0.0_f32,
25716        vz: 0.0_f32,
25717        afx: 0.0_f32,
25718        afy: 0.0_f32,
25719        afz: 0.0_f32,
25720        yaw: 0.0_f32,
25721        yaw_rate: 0.0_f32,
25722        type_mask: PositionTargetTypemask::DEFAULT,
25723        coordinate_frame: MavFrame::DEFAULT,
25724    };
25725    #[cfg(feature = "arbitrary")]
25726    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25727        use arbitrary::{Arbitrary, Unstructured};
25728        let mut buf = [0u8; 1024];
25729        rng.fill_bytes(&mut buf);
25730        let mut unstructured = Unstructured::new(&buf);
25731        Self::arbitrary(&mut unstructured).unwrap_or_default()
25732    }
25733}
25734impl Default for POSITION_TARGET_LOCAL_NED_DATA {
25735    fn default() -> Self {
25736        Self::DEFAULT.clone()
25737    }
25738}
25739impl MessageData for POSITION_TARGET_LOCAL_NED_DATA {
25740    type Message = MavMessage;
25741    const ID: u32 = 85u32;
25742    const NAME: &'static str = "POSITION_TARGET_LOCAL_NED";
25743    const EXTRA_CRC: u8 = 140u8;
25744    const ENCODED_LEN: usize = 51usize;
25745    fn deser(
25746        _version: MavlinkVersion,
25747        __input: &[u8],
25748    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25749        let avail_len = __input.len();
25750        let mut payload_buf = [0; Self::ENCODED_LEN];
25751        let mut buf = if avail_len < Self::ENCODED_LEN {
25752            payload_buf[0..avail_len].copy_from_slice(__input);
25753            Bytes::new(&payload_buf)
25754        } else {
25755            Bytes::new(__input)
25756        };
25757        let mut __struct = Self::default();
25758        __struct.time_boot_ms = buf.get_u32_le();
25759        __struct.x = buf.get_f32_le();
25760        __struct.y = buf.get_f32_le();
25761        __struct.z = buf.get_f32_le();
25762        __struct.vx = buf.get_f32_le();
25763        __struct.vy = buf.get_f32_le();
25764        __struct.vz = buf.get_f32_le();
25765        __struct.afx = buf.get_f32_le();
25766        __struct.afy = buf.get_f32_le();
25767        __struct.afz = buf.get_f32_le();
25768        __struct.yaw = buf.get_f32_le();
25769        __struct.yaw_rate = buf.get_f32_le();
25770        let tmp = buf.get_u16_le();
25771        __struct.type_mask = PositionTargetTypemask::from_bits(
25772            tmp & PositionTargetTypemask::all().bits(),
25773        )
25774        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
25775            flag_type: "PositionTargetTypemask",
25776            value: tmp as u32,
25777        })?;
25778        let tmp = buf.get_u8();
25779        __struct.coordinate_frame =
25780            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
25781                enum_type: "MavFrame",
25782                value: tmp as u32,
25783            })?;
25784        Ok(__struct)
25785    }
25786    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25787        let mut __tmp = BytesMut::new(bytes);
25788        #[allow(clippy::absurd_extreme_comparisons)]
25789        #[allow(unused_comparisons)]
25790        if __tmp.remaining() < Self::ENCODED_LEN {
25791            panic!(
25792                "buffer is too small (need {} bytes, but got {})",
25793                Self::ENCODED_LEN,
25794                __tmp.remaining(),
25795            )
25796        }
25797        __tmp.put_u32_le(self.time_boot_ms);
25798        __tmp.put_f32_le(self.x);
25799        __tmp.put_f32_le(self.y);
25800        __tmp.put_f32_le(self.z);
25801        __tmp.put_f32_le(self.vx);
25802        __tmp.put_f32_le(self.vy);
25803        __tmp.put_f32_le(self.vz);
25804        __tmp.put_f32_le(self.afx);
25805        __tmp.put_f32_le(self.afy);
25806        __tmp.put_f32_le(self.afz);
25807        __tmp.put_f32_le(self.yaw);
25808        __tmp.put_f32_le(self.yaw_rate);
25809        __tmp.put_u16_le(self.type_mask.bits());
25810        __tmp.put_u8(self.coordinate_frame as u8);
25811        if matches!(version, MavlinkVersion::V2) {
25812            let len = __tmp.len();
25813            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25814        } else {
25815            __tmp.len()
25816        }
25817    }
25818}
25819#[doc = "Power supply status."]
25820#[doc = ""]
25821#[doc = "ID: 125"]
25822#[derive(Debug, Clone, PartialEq)]
25823#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25824#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25825#[cfg_attr(feature = "ts", derive(TS))]
25826#[cfg_attr(feature = "ts", ts(export))]
25827pub struct POWER_STATUS_DATA {
25828    #[doc = "5V rail voltage."]
25829    pub Vcc: u16,
25830    #[doc = "Servo rail voltage."]
25831    pub Vservo: u16,
25832    #[doc = "Bitmap of power supply status flags."]
25833    pub flags: MavPowerStatus,
25834}
25835impl POWER_STATUS_DATA {
25836    pub const ENCODED_LEN: usize = 6usize;
25837    pub const DEFAULT: Self = Self {
25838        Vcc: 0_u16,
25839        Vservo: 0_u16,
25840        flags: MavPowerStatus::DEFAULT,
25841    };
25842    #[cfg(feature = "arbitrary")]
25843    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25844        use arbitrary::{Arbitrary, Unstructured};
25845        let mut buf = [0u8; 1024];
25846        rng.fill_bytes(&mut buf);
25847        let mut unstructured = Unstructured::new(&buf);
25848        Self::arbitrary(&mut unstructured).unwrap_or_default()
25849    }
25850}
25851impl Default for POWER_STATUS_DATA {
25852    fn default() -> Self {
25853        Self::DEFAULT.clone()
25854    }
25855}
25856impl MessageData for POWER_STATUS_DATA {
25857    type Message = MavMessage;
25858    const ID: u32 = 125u32;
25859    const NAME: &'static str = "POWER_STATUS";
25860    const EXTRA_CRC: u8 = 203u8;
25861    const ENCODED_LEN: usize = 6usize;
25862    fn deser(
25863        _version: MavlinkVersion,
25864        __input: &[u8],
25865    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25866        let avail_len = __input.len();
25867        let mut payload_buf = [0; Self::ENCODED_LEN];
25868        let mut buf = if avail_len < Self::ENCODED_LEN {
25869            payload_buf[0..avail_len].copy_from_slice(__input);
25870            Bytes::new(&payload_buf)
25871        } else {
25872            Bytes::new(__input)
25873        };
25874        let mut __struct = Self::default();
25875        __struct.Vcc = buf.get_u16_le();
25876        __struct.Vservo = buf.get_u16_le();
25877        let tmp = buf.get_u16_le();
25878        __struct.flags = MavPowerStatus::from_bits(tmp & MavPowerStatus::all().bits()).ok_or(
25879            ::mavlink_core::error::ParserError::InvalidFlag {
25880                flag_type: "MavPowerStatus",
25881                value: tmp as u32,
25882            },
25883        )?;
25884        Ok(__struct)
25885    }
25886    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25887        let mut __tmp = BytesMut::new(bytes);
25888        #[allow(clippy::absurd_extreme_comparisons)]
25889        #[allow(unused_comparisons)]
25890        if __tmp.remaining() < Self::ENCODED_LEN {
25891            panic!(
25892                "buffer is too small (need {} bytes, but got {})",
25893                Self::ENCODED_LEN,
25894                __tmp.remaining(),
25895            )
25896        }
25897        __tmp.put_u16_le(self.Vcc);
25898        __tmp.put_u16_le(self.Vservo);
25899        __tmp.put_u16_le(self.flags.bits());
25900        if matches!(version, MavlinkVersion::V2) {
25901            let len = __tmp.len();
25902            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25903        } else {
25904            __tmp.len()
25905        }
25906    }
25907}
25908#[doc = "Version and capability of protocol version. This message can be requested with MAV_CMD_REQUEST_MESSAGE and is used as part of the handshaking to establish which MAVLink version should be used on the network. Every node should respond to a request for PROTOCOL_VERSION to enable the handshaking. Library implementers should consider adding this into the default decoding state machine to allow the protocol core to respond directly."]
25909#[doc = ""]
25910#[doc = "ID: 300"]
25911#[derive(Debug, Clone, PartialEq)]
25912#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25913#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25914#[cfg_attr(feature = "ts", derive(TS))]
25915#[cfg_attr(feature = "ts", ts(export))]
25916pub struct PROTOCOL_VERSION_DATA {
25917    #[doc = "Currently active MAVLink version number * 100: v1.0 is 100, v2.0 is 200, etc."]
25918    pub version: u16,
25919    #[doc = "Minimum MAVLink version supported"]
25920    pub min_version: u16,
25921    #[doc = "Maximum MAVLink version supported (set to the same value as version by default)"]
25922    pub max_version: u16,
25923    #[doc = "The first 8 bytes (not characters printed in hex!) of the git hash."]
25924    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
25925    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
25926    pub spec_version_hash: [u8; 8],
25927    #[doc = "The first 8 bytes (not characters printed in hex!) of the git hash."]
25928    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
25929    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
25930    pub library_version_hash: [u8; 8],
25931}
25932impl PROTOCOL_VERSION_DATA {
25933    pub const ENCODED_LEN: usize = 22usize;
25934    pub const DEFAULT: Self = Self {
25935        version: 0_u16,
25936        min_version: 0_u16,
25937        max_version: 0_u16,
25938        spec_version_hash: [0_u8; 8usize],
25939        library_version_hash: [0_u8; 8usize],
25940    };
25941    #[cfg(feature = "arbitrary")]
25942    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25943        use arbitrary::{Arbitrary, Unstructured};
25944        let mut buf = [0u8; 1024];
25945        rng.fill_bytes(&mut buf);
25946        let mut unstructured = Unstructured::new(&buf);
25947        Self::arbitrary(&mut unstructured).unwrap_or_default()
25948    }
25949}
25950impl Default for PROTOCOL_VERSION_DATA {
25951    fn default() -> Self {
25952        Self::DEFAULT.clone()
25953    }
25954}
25955impl MessageData for PROTOCOL_VERSION_DATA {
25956    type Message = MavMessage;
25957    const ID: u32 = 300u32;
25958    const NAME: &'static str = "PROTOCOL_VERSION";
25959    const EXTRA_CRC: u8 = 217u8;
25960    const ENCODED_LEN: usize = 22usize;
25961    fn deser(
25962        _version: MavlinkVersion,
25963        __input: &[u8],
25964    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25965        let avail_len = __input.len();
25966        let mut payload_buf = [0; Self::ENCODED_LEN];
25967        let mut buf = if avail_len < Self::ENCODED_LEN {
25968            payload_buf[0..avail_len].copy_from_slice(__input);
25969            Bytes::new(&payload_buf)
25970        } else {
25971            Bytes::new(__input)
25972        };
25973        let mut __struct = Self::default();
25974        __struct.version = buf.get_u16_le();
25975        __struct.min_version = buf.get_u16_le();
25976        __struct.max_version = buf.get_u16_le();
25977        for v in &mut __struct.spec_version_hash {
25978            let val = buf.get_u8();
25979            *v = val;
25980        }
25981        for v in &mut __struct.library_version_hash {
25982            let val = buf.get_u8();
25983            *v = val;
25984        }
25985        Ok(__struct)
25986    }
25987    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25988        let mut __tmp = BytesMut::new(bytes);
25989        #[allow(clippy::absurd_extreme_comparisons)]
25990        #[allow(unused_comparisons)]
25991        if __tmp.remaining() < Self::ENCODED_LEN {
25992            panic!(
25993                "buffer is too small (need {} bytes, but got {})",
25994                Self::ENCODED_LEN,
25995                __tmp.remaining(),
25996            )
25997        }
25998        __tmp.put_u16_le(self.version);
25999        __tmp.put_u16_le(self.min_version);
26000        __tmp.put_u16_le(self.max_version);
26001        for val in &self.spec_version_hash {
26002            __tmp.put_u8(*val);
26003        }
26004        for val in &self.library_version_hash {
26005            __tmp.put_u8(*val);
26006        }
26007        if matches!(version, MavlinkVersion::V2) {
26008            let len = __tmp.len();
26009            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26010        } else {
26011            __tmp.len()
26012        }
26013    }
26014}
26015#[doc = "Status generated by radio and injected into MAVLink stream."]
26016#[doc = ""]
26017#[doc = "ID: 109"]
26018#[derive(Debug, Clone, PartialEq)]
26019#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26020#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26021#[cfg_attr(feature = "ts", derive(TS))]
26022#[cfg_attr(feature = "ts", ts(export))]
26023pub struct RADIO_STATUS_DATA {
26024    #[doc = "Count of radio packet receive errors (since boot)."]
26025    pub rxerrors: u16,
26026    #[doc = "Count of error corrected radio packets (since boot)."]
26027    pub fixed: u16,
26028    #[doc = "Local (message sender) received signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
26029    pub rssi: u8,
26030    #[doc = "Remote (message receiver) signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
26031    pub remrssi: u8,
26032    #[doc = "Remaining free transmitter buffer space."]
26033    pub txbuf: u8,
26034    #[doc = "Local background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown."]
26035    pub noise: u8,
26036    #[doc = "Remote background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown."]
26037    pub remnoise: u8,
26038}
26039impl RADIO_STATUS_DATA {
26040    pub const ENCODED_LEN: usize = 9usize;
26041    pub const DEFAULT: Self = Self {
26042        rxerrors: 0_u16,
26043        fixed: 0_u16,
26044        rssi: 0_u8,
26045        remrssi: 0_u8,
26046        txbuf: 0_u8,
26047        noise: 0_u8,
26048        remnoise: 0_u8,
26049    };
26050    #[cfg(feature = "arbitrary")]
26051    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26052        use arbitrary::{Arbitrary, Unstructured};
26053        let mut buf = [0u8; 1024];
26054        rng.fill_bytes(&mut buf);
26055        let mut unstructured = Unstructured::new(&buf);
26056        Self::arbitrary(&mut unstructured).unwrap_or_default()
26057    }
26058}
26059impl Default for RADIO_STATUS_DATA {
26060    fn default() -> Self {
26061        Self::DEFAULT.clone()
26062    }
26063}
26064impl MessageData for RADIO_STATUS_DATA {
26065    type Message = MavMessage;
26066    const ID: u32 = 109u32;
26067    const NAME: &'static str = "RADIO_STATUS";
26068    const EXTRA_CRC: u8 = 185u8;
26069    const ENCODED_LEN: usize = 9usize;
26070    fn deser(
26071        _version: MavlinkVersion,
26072        __input: &[u8],
26073    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26074        let avail_len = __input.len();
26075        let mut payload_buf = [0; Self::ENCODED_LEN];
26076        let mut buf = if avail_len < Self::ENCODED_LEN {
26077            payload_buf[0..avail_len].copy_from_slice(__input);
26078            Bytes::new(&payload_buf)
26079        } else {
26080            Bytes::new(__input)
26081        };
26082        let mut __struct = Self::default();
26083        __struct.rxerrors = buf.get_u16_le();
26084        __struct.fixed = buf.get_u16_le();
26085        __struct.rssi = buf.get_u8();
26086        __struct.remrssi = buf.get_u8();
26087        __struct.txbuf = buf.get_u8();
26088        __struct.noise = buf.get_u8();
26089        __struct.remnoise = buf.get_u8();
26090        Ok(__struct)
26091    }
26092    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26093        let mut __tmp = BytesMut::new(bytes);
26094        #[allow(clippy::absurd_extreme_comparisons)]
26095        #[allow(unused_comparisons)]
26096        if __tmp.remaining() < Self::ENCODED_LEN {
26097            panic!(
26098                "buffer is too small (need {} bytes, but got {})",
26099                Self::ENCODED_LEN,
26100                __tmp.remaining(),
26101            )
26102        }
26103        __tmp.put_u16_le(self.rxerrors);
26104        __tmp.put_u16_le(self.fixed);
26105        __tmp.put_u8(self.rssi);
26106        __tmp.put_u8(self.remrssi);
26107        __tmp.put_u8(self.txbuf);
26108        __tmp.put_u8(self.noise);
26109        __tmp.put_u8(self.remnoise);
26110        if matches!(version, MavlinkVersion::V2) {
26111            let len = __tmp.len();
26112            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26113        } else {
26114            __tmp.len()
26115        }
26116    }
26117}
26118#[doc = "The RAW IMU readings for a 9DOF sensor, which is identified by the id (default IMU1). This message should always contain the true raw values without any scaling to allow data capture and system debugging."]
26119#[doc = ""]
26120#[doc = "ID: 27"]
26121#[derive(Debug, Clone, PartialEq)]
26122#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26123#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26124#[cfg_attr(feature = "ts", derive(TS))]
26125#[cfg_attr(feature = "ts", ts(export))]
26126pub struct RAW_IMU_DATA {
26127    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
26128    pub time_usec: u64,
26129    #[doc = "X acceleration (raw)"]
26130    pub xacc: i16,
26131    #[doc = "Y acceleration (raw)"]
26132    pub yacc: i16,
26133    #[doc = "Z acceleration (raw)"]
26134    pub zacc: i16,
26135    #[doc = "Angular speed around X axis (raw)"]
26136    pub xgyro: i16,
26137    #[doc = "Angular speed around Y axis (raw)"]
26138    pub ygyro: i16,
26139    #[doc = "Angular speed around Z axis (raw)"]
26140    pub zgyro: i16,
26141    #[doc = "X Magnetic field (raw)"]
26142    pub xmag: i16,
26143    #[doc = "Y Magnetic field (raw)"]
26144    pub ymag: i16,
26145    #[doc = "Z Magnetic field (raw)"]
26146    pub zmag: i16,
26147    #[doc = "Id. Ids are numbered from 0 and map to IMUs numbered from 1 (e.g. IMU1 will have a message with id=0)"]
26148    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26149    pub id: u8,
26150    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
26151    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26152    pub temperature: i16,
26153}
26154impl RAW_IMU_DATA {
26155    pub const ENCODED_LEN: usize = 29usize;
26156    pub const DEFAULT: Self = Self {
26157        time_usec: 0_u64,
26158        xacc: 0_i16,
26159        yacc: 0_i16,
26160        zacc: 0_i16,
26161        xgyro: 0_i16,
26162        ygyro: 0_i16,
26163        zgyro: 0_i16,
26164        xmag: 0_i16,
26165        ymag: 0_i16,
26166        zmag: 0_i16,
26167        id: 0_u8,
26168        temperature: 0_i16,
26169    };
26170    #[cfg(feature = "arbitrary")]
26171    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26172        use arbitrary::{Arbitrary, Unstructured};
26173        let mut buf = [0u8; 1024];
26174        rng.fill_bytes(&mut buf);
26175        let mut unstructured = Unstructured::new(&buf);
26176        Self::arbitrary(&mut unstructured).unwrap_or_default()
26177    }
26178}
26179impl Default for RAW_IMU_DATA {
26180    fn default() -> Self {
26181        Self::DEFAULT.clone()
26182    }
26183}
26184impl MessageData for RAW_IMU_DATA {
26185    type Message = MavMessage;
26186    const ID: u32 = 27u32;
26187    const NAME: &'static str = "RAW_IMU";
26188    const EXTRA_CRC: u8 = 144u8;
26189    const ENCODED_LEN: usize = 29usize;
26190    fn deser(
26191        _version: MavlinkVersion,
26192        __input: &[u8],
26193    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26194        let avail_len = __input.len();
26195        let mut payload_buf = [0; Self::ENCODED_LEN];
26196        let mut buf = if avail_len < Self::ENCODED_LEN {
26197            payload_buf[0..avail_len].copy_from_slice(__input);
26198            Bytes::new(&payload_buf)
26199        } else {
26200            Bytes::new(__input)
26201        };
26202        let mut __struct = Self::default();
26203        __struct.time_usec = buf.get_u64_le();
26204        __struct.xacc = buf.get_i16_le();
26205        __struct.yacc = buf.get_i16_le();
26206        __struct.zacc = buf.get_i16_le();
26207        __struct.xgyro = buf.get_i16_le();
26208        __struct.ygyro = buf.get_i16_le();
26209        __struct.zgyro = buf.get_i16_le();
26210        __struct.xmag = buf.get_i16_le();
26211        __struct.ymag = buf.get_i16_le();
26212        __struct.zmag = buf.get_i16_le();
26213        __struct.id = buf.get_u8();
26214        __struct.temperature = buf.get_i16_le();
26215        Ok(__struct)
26216    }
26217    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26218        let mut __tmp = BytesMut::new(bytes);
26219        #[allow(clippy::absurd_extreme_comparisons)]
26220        #[allow(unused_comparisons)]
26221        if __tmp.remaining() < Self::ENCODED_LEN {
26222            panic!(
26223                "buffer is too small (need {} bytes, but got {})",
26224                Self::ENCODED_LEN,
26225                __tmp.remaining(),
26226            )
26227        }
26228        __tmp.put_u64_le(self.time_usec);
26229        __tmp.put_i16_le(self.xacc);
26230        __tmp.put_i16_le(self.yacc);
26231        __tmp.put_i16_le(self.zacc);
26232        __tmp.put_i16_le(self.xgyro);
26233        __tmp.put_i16_le(self.ygyro);
26234        __tmp.put_i16_le(self.zgyro);
26235        __tmp.put_i16_le(self.xmag);
26236        __tmp.put_i16_le(self.ymag);
26237        __tmp.put_i16_le(self.zmag);
26238        if matches!(version, MavlinkVersion::V2) {
26239            __tmp.put_u8(self.id);
26240            __tmp.put_i16_le(self.temperature);
26241            let len = __tmp.len();
26242            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26243        } else {
26244            __tmp.len()
26245        }
26246    }
26247}
26248#[doc = "The RAW pressure readings for the typical setup of one absolute pressure and one differential pressure sensor. The sensor values should be the raw, UNSCALED ADC values."]
26249#[doc = ""]
26250#[doc = "ID: 28"]
26251#[derive(Debug, Clone, PartialEq)]
26252#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26253#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26254#[cfg_attr(feature = "ts", derive(TS))]
26255#[cfg_attr(feature = "ts", ts(export))]
26256pub struct RAW_PRESSURE_DATA {
26257    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
26258    pub time_usec: u64,
26259    #[doc = "Absolute pressure (raw)"]
26260    pub press_abs: i16,
26261    #[doc = "Differential pressure 1 (raw, 0 if nonexistent)"]
26262    pub press_diff1: i16,
26263    #[doc = "Differential pressure 2 (raw, 0 if nonexistent)"]
26264    pub press_diff2: i16,
26265    #[doc = "Raw Temperature measurement (raw)"]
26266    pub temperature: i16,
26267}
26268impl RAW_PRESSURE_DATA {
26269    pub const ENCODED_LEN: usize = 16usize;
26270    pub const DEFAULT: Self = Self {
26271        time_usec: 0_u64,
26272        press_abs: 0_i16,
26273        press_diff1: 0_i16,
26274        press_diff2: 0_i16,
26275        temperature: 0_i16,
26276    };
26277    #[cfg(feature = "arbitrary")]
26278    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26279        use arbitrary::{Arbitrary, Unstructured};
26280        let mut buf = [0u8; 1024];
26281        rng.fill_bytes(&mut buf);
26282        let mut unstructured = Unstructured::new(&buf);
26283        Self::arbitrary(&mut unstructured).unwrap_or_default()
26284    }
26285}
26286impl Default for RAW_PRESSURE_DATA {
26287    fn default() -> Self {
26288        Self::DEFAULT.clone()
26289    }
26290}
26291impl MessageData for RAW_PRESSURE_DATA {
26292    type Message = MavMessage;
26293    const ID: u32 = 28u32;
26294    const NAME: &'static str = "RAW_PRESSURE";
26295    const EXTRA_CRC: u8 = 67u8;
26296    const ENCODED_LEN: usize = 16usize;
26297    fn deser(
26298        _version: MavlinkVersion,
26299        __input: &[u8],
26300    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26301        let avail_len = __input.len();
26302        let mut payload_buf = [0; Self::ENCODED_LEN];
26303        let mut buf = if avail_len < Self::ENCODED_LEN {
26304            payload_buf[0..avail_len].copy_from_slice(__input);
26305            Bytes::new(&payload_buf)
26306        } else {
26307            Bytes::new(__input)
26308        };
26309        let mut __struct = Self::default();
26310        __struct.time_usec = buf.get_u64_le();
26311        __struct.press_abs = buf.get_i16_le();
26312        __struct.press_diff1 = buf.get_i16_le();
26313        __struct.press_diff2 = buf.get_i16_le();
26314        __struct.temperature = buf.get_i16_le();
26315        Ok(__struct)
26316    }
26317    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26318        let mut __tmp = BytesMut::new(bytes);
26319        #[allow(clippy::absurd_extreme_comparisons)]
26320        #[allow(unused_comparisons)]
26321        if __tmp.remaining() < Self::ENCODED_LEN {
26322            panic!(
26323                "buffer is too small (need {} bytes, but got {})",
26324                Self::ENCODED_LEN,
26325                __tmp.remaining(),
26326            )
26327        }
26328        __tmp.put_u64_le(self.time_usec);
26329        __tmp.put_i16_le(self.press_abs);
26330        __tmp.put_i16_le(self.press_diff1);
26331        __tmp.put_i16_le(self.press_diff2);
26332        __tmp.put_i16_le(self.temperature);
26333        if matches!(version, MavlinkVersion::V2) {
26334            let len = __tmp.len();
26335            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26336        } else {
26337            __tmp.len()
26338        }
26339    }
26340}
26341#[doc = "RPM sensor data message."]
26342#[doc = ""]
26343#[doc = "ID: 339"]
26344#[derive(Debug, Clone, PartialEq)]
26345#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26346#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26347#[cfg_attr(feature = "ts", derive(TS))]
26348#[cfg_attr(feature = "ts", ts(export))]
26349pub struct RAW_RPM_DATA {
26350    #[doc = "Indicated rate"]
26351    pub frequency: f32,
26352    #[doc = "Index of this RPM sensor (0-indexed)"]
26353    pub index: u8,
26354}
26355impl RAW_RPM_DATA {
26356    pub const ENCODED_LEN: usize = 5usize;
26357    pub const DEFAULT: Self = Self {
26358        frequency: 0.0_f32,
26359        index: 0_u8,
26360    };
26361    #[cfg(feature = "arbitrary")]
26362    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26363        use arbitrary::{Arbitrary, Unstructured};
26364        let mut buf = [0u8; 1024];
26365        rng.fill_bytes(&mut buf);
26366        let mut unstructured = Unstructured::new(&buf);
26367        Self::arbitrary(&mut unstructured).unwrap_or_default()
26368    }
26369}
26370impl Default for RAW_RPM_DATA {
26371    fn default() -> Self {
26372        Self::DEFAULT.clone()
26373    }
26374}
26375impl MessageData for RAW_RPM_DATA {
26376    type Message = MavMessage;
26377    const ID: u32 = 339u32;
26378    const NAME: &'static str = "RAW_RPM";
26379    const EXTRA_CRC: u8 = 199u8;
26380    const ENCODED_LEN: usize = 5usize;
26381    fn deser(
26382        _version: MavlinkVersion,
26383        __input: &[u8],
26384    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26385        let avail_len = __input.len();
26386        let mut payload_buf = [0; Self::ENCODED_LEN];
26387        let mut buf = if avail_len < Self::ENCODED_LEN {
26388            payload_buf[0..avail_len].copy_from_slice(__input);
26389            Bytes::new(&payload_buf)
26390        } else {
26391            Bytes::new(__input)
26392        };
26393        let mut __struct = Self::default();
26394        __struct.frequency = buf.get_f32_le();
26395        __struct.index = buf.get_u8();
26396        Ok(__struct)
26397    }
26398    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26399        let mut __tmp = BytesMut::new(bytes);
26400        #[allow(clippy::absurd_extreme_comparisons)]
26401        #[allow(unused_comparisons)]
26402        if __tmp.remaining() < Self::ENCODED_LEN {
26403            panic!(
26404                "buffer is too small (need {} bytes, but got {})",
26405                Self::ENCODED_LEN,
26406                __tmp.remaining(),
26407            )
26408        }
26409        __tmp.put_f32_le(self.frequency);
26410        __tmp.put_u8(self.index);
26411        if matches!(version, MavlinkVersion::V2) {
26412            let len = __tmp.len();
26413            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26414        } else {
26415            __tmp.len()
26416        }
26417    }
26418}
26419#[doc = "The PPM values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%.  A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
26420#[doc = ""]
26421#[doc = "ID: 65"]
26422#[derive(Debug, Clone, PartialEq)]
26423#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26424#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26425#[cfg_attr(feature = "ts", derive(TS))]
26426#[cfg_attr(feature = "ts", ts(export))]
26427pub struct RC_CHANNELS_DATA {
26428    #[doc = "Timestamp (time since system boot)."]
26429    pub time_boot_ms: u32,
26430    #[doc = "RC channel 1 value."]
26431    pub chan1_raw: u16,
26432    #[doc = "RC channel 2 value."]
26433    pub chan2_raw: u16,
26434    #[doc = "RC channel 3 value."]
26435    pub chan3_raw: u16,
26436    #[doc = "RC channel 4 value."]
26437    pub chan4_raw: u16,
26438    #[doc = "RC channel 5 value."]
26439    pub chan5_raw: u16,
26440    #[doc = "RC channel 6 value."]
26441    pub chan6_raw: u16,
26442    #[doc = "RC channel 7 value."]
26443    pub chan7_raw: u16,
26444    #[doc = "RC channel 8 value."]
26445    pub chan8_raw: u16,
26446    #[doc = "RC channel 9 value."]
26447    pub chan9_raw: u16,
26448    #[doc = "RC channel 10 value."]
26449    pub chan10_raw: u16,
26450    #[doc = "RC channel 11 value."]
26451    pub chan11_raw: u16,
26452    #[doc = "RC channel 12 value."]
26453    pub chan12_raw: u16,
26454    #[doc = "RC channel 13 value."]
26455    pub chan13_raw: u16,
26456    #[doc = "RC channel 14 value."]
26457    pub chan14_raw: u16,
26458    #[doc = "RC channel 15 value."]
26459    pub chan15_raw: u16,
26460    #[doc = "RC channel 16 value."]
26461    pub chan16_raw: u16,
26462    #[doc = "RC channel 17 value."]
26463    pub chan17_raw: u16,
26464    #[doc = "RC channel 18 value."]
26465    pub chan18_raw: u16,
26466    #[doc = "Total number of RC channels being received. This can be larger than 18, indicating that more channels are available but not given in this message. This value should be 0 when no RC channels are available."]
26467    pub chancount: u8,
26468    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
26469    pub rssi: u8,
26470}
26471impl RC_CHANNELS_DATA {
26472    pub const ENCODED_LEN: usize = 42usize;
26473    pub const DEFAULT: Self = Self {
26474        time_boot_ms: 0_u32,
26475        chan1_raw: 0_u16,
26476        chan2_raw: 0_u16,
26477        chan3_raw: 0_u16,
26478        chan4_raw: 0_u16,
26479        chan5_raw: 0_u16,
26480        chan6_raw: 0_u16,
26481        chan7_raw: 0_u16,
26482        chan8_raw: 0_u16,
26483        chan9_raw: 0_u16,
26484        chan10_raw: 0_u16,
26485        chan11_raw: 0_u16,
26486        chan12_raw: 0_u16,
26487        chan13_raw: 0_u16,
26488        chan14_raw: 0_u16,
26489        chan15_raw: 0_u16,
26490        chan16_raw: 0_u16,
26491        chan17_raw: 0_u16,
26492        chan18_raw: 0_u16,
26493        chancount: 0_u8,
26494        rssi: 0_u8,
26495    };
26496    #[cfg(feature = "arbitrary")]
26497    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26498        use arbitrary::{Arbitrary, Unstructured};
26499        let mut buf = [0u8; 1024];
26500        rng.fill_bytes(&mut buf);
26501        let mut unstructured = Unstructured::new(&buf);
26502        Self::arbitrary(&mut unstructured).unwrap_or_default()
26503    }
26504}
26505impl Default for RC_CHANNELS_DATA {
26506    fn default() -> Self {
26507        Self::DEFAULT.clone()
26508    }
26509}
26510impl MessageData for RC_CHANNELS_DATA {
26511    type Message = MavMessage;
26512    const ID: u32 = 65u32;
26513    const NAME: &'static str = "RC_CHANNELS";
26514    const EXTRA_CRC: u8 = 118u8;
26515    const ENCODED_LEN: usize = 42usize;
26516    fn deser(
26517        _version: MavlinkVersion,
26518        __input: &[u8],
26519    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26520        let avail_len = __input.len();
26521        let mut payload_buf = [0; Self::ENCODED_LEN];
26522        let mut buf = if avail_len < Self::ENCODED_LEN {
26523            payload_buf[0..avail_len].copy_from_slice(__input);
26524            Bytes::new(&payload_buf)
26525        } else {
26526            Bytes::new(__input)
26527        };
26528        let mut __struct = Self::default();
26529        __struct.time_boot_ms = buf.get_u32_le();
26530        __struct.chan1_raw = buf.get_u16_le();
26531        __struct.chan2_raw = buf.get_u16_le();
26532        __struct.chan3_raw = buf.get_u16_le();
26533        __struct.chan4_raw = buf.get_u16_le();
26534        __struct.chan5_raw = buf.get_u16_le();
26535        __struct.chan6_raw = buf.get_u16_le();
26536        __struct.chan7_raw = buf.get_u16_le();
26537        __struct.chan8_raw = buf.get_u16_le();
26538        __struct.chan9_raw = buf.get_u16_le();
26539        __struct.chan10_raw = buf.get_u16_le();
26540        __struct.chan11_raw = buf.get_u16_le();
26541        __struct.chan12_raw = buf.get_u16_le();
26542        __struct.chan13_raw = buf.get_u16_le();
26543        __struct.chan14_raw = buf.get_u16_le();
26544        __struct.chan15_raw = buf.get_u16_le();
26545        __struct.chan16_raw = buf.get_u16_le();
26546        __struct.chan17_raw = buf.get_u16_le();
26547        __struct.chan18_raw = buf.get_u16_le();
26548        __struct.chancount = buf.get_u8();
26549        __struct.rssi = buf.get_u8();
26550        Ok(__struct)
26551    }
26552    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26553        let mut __tmp = BytesMut::new(bytes);
26554        #[allow(clippy::absurd_extreme_comparisons)]
26555        #[allow(unused_comparisons)]
26556        if __tmp.remaining() < Self::ENCODED_LEN {
26557            panic!(
26558                "buffer is too small (need {} bytes, but got {})",
26559                Self::ENCODED_LEN,
26560                __tmp.remaining(),
26561            )
26562        }
26563        __tmp.put_u32_le(self.time_boot_ms);
26564        __tmp.put_u16_le(self.chan1_raw);
26565        __tmp.put_u16_le(self.chan2_raw);
26566        __tmp.put_u16_le(self.chan3_raw);
26567        __tmp.put_u16_le(self.chan4_raw);
26568        __tmp.put_u16_le(self.chan5_raw);
26569        __tmp.put_u16_le(self.chan6_raw);
26570        __tmp.put_u16_le(self.chan7_raw);
26571        __tmp.put_u16_le(self.chan8_raw);
26572        __tmp.put_u16_le(self.chan9_raw);
26573        __tmp.put_u16_le(self.chan10_raw);
26574        __tmp.put_u16_le(self.chan11_raw);
26575        __tmp.put_u16_le(self.chan12_raw);
26576        __tmp.put_u16_le(self.chan13_raw);
26577        __tmp.put_u16_le(self.chan14_raw);
26578        __tmp.put_u16_le(self.chan15_raw);
26579        __tmp.put_u16_le(self.chan16_raw);
26580        __tmp.put_u16_le(self.chan17_raw);
26581        __tmp.put_u16_le(self.chan18_raw);
26582        __tmp.put_u8(self.chancount);
26583        __tmp.put_u8(self.rssi);
26584        if matches!(version, MavlinkVersion::V2) {
26585            let len = __tmp.len();
26586            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26587        } else {
26588            __tmp.len()
26589        }
26590    }
26591}
26592#[doc = "The RAW values of the RC channels sent to the MAV to override info received from the RC radio. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification.  Note carefully the semantic differences between the first 8 channels and the subsequent channels."]
26593#[doc = ""]
26594#[doc = "ID: 70"]
26595#[derive(Debug, Clone, PartialEq)]
26596#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26597#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26598#[cfg_attr(feature = "ts", derive(TS))]
26599#[cfg_attr(feature = "ts", ts(export))]
26600pub struct RC_CHANNELS_OVERRIDE_DATA {
26601    #[doc = "RC channel 1 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26602    pub chan1_raw: u16,
26603    #[doc = "RC channel 2 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26604    pub chan2_raw: u16,
26605    #[doc = "RC channel 3 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26606    pub chan3_raw: u16,
26607    #[doc = "RC channel 4 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26608    pub chan4_raw: u16,
26609    #[doc = "RC channel 5 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26610    pub chan5_raw: u16,
26611    #[doc = "RC channel 6 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26612    pub chan6_raw: u16,
26613    #[doc = "RC channel 7 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26614    pub chan7_raw: u16,
26615    #[doc = "RC channel 8 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26616    pub chan8_raw: u16,
26617    #[doc = "System ID"]
26618    pub target_system: u8,
26619    #[doc = "Component ID"]
26620    pub target_component: u8,
26621    #[doc = "RC channel 9 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26622    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26623    pub chan9_raw: u16,
26624    #[doc = "RC channel 10 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26625    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26626    pub chan10_raw: u16,
26627    #[doc = "RC channel 11 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26628    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26629    pub chan11_raw: u16,
26630    #[doc = "RC channel 12 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26631    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26632    pub chan12_raw: u16,
26633    #[doc = "RC channel 13 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26634    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26635    pub chan13_raw: u16,
26636    #[doc = "RC channel 14 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26637    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26638    pub chan14_raw: u16,
26639    #[doc = "RC channel 15 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26640    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26641    pub chan15_raw: u16,
26642    #[doc = "RC channel 16 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26643    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26644    pub chan16_raw: u16,
26645    #[doc = "RC channel 17 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26646    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26647    pub chan17_raw: u16,
26648    #[doc = "RC channel 18 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26649    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26650    pub chan18_raw: u16,
26651}
26652impl RC_CHANNELS_OVERRIDE_DATA {
26653    pub const ENCODED_LEN: usize = 38usize;
26654    pub const DEFAULT: Self = Self {
26655        chan1_raw: 0_u16,
26656        chan2_raw: 0_u16,
26657        chan3_raw: 0_u16,
26658        chan4_raw: 0_u16,
26659        chan5_raw: 0_u16,
26660        chan6_raw: 0_u16,
26661        chan7_raw: 0_u16,
26662        chan8_raw: 0_u16,
26663        target_system: 0_u8,
26664        target_component: 0_u8,
26665        chan9_raw: 0_u16,
26666        chan10_raw: 0_u16,
26667        chan11_raw: 0_u16,
26668        chan12_raw: 0_u16,
26669        chan13_raw: 0_u16,
26670        chan14_raw: 0_u16,
26671        chan15_raw: 0_u16,
26672        chan16_raw: 0_u16,
26673        chan17_raw: 0_u16,
26674        chan18_raw: 0_u16,
26675    };
26676    #[cfg(feature = "arbitrary")]
26677    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26678        use arbitrary::{Arbitrary, Unstructured};
26679        let mut buf = [0u8; 1024];
26680        rng.fill_bytes(&mut buf);
26681        let mut unstructured = Unstructured::new(&buf);
26682        Self::arbitrary(&mut unstructured).unwrap_or_default()
26683    }
26684}
26685impl Default for RC_CHANNELS_OVERRIDE_DATA {
26686    fn default() -> Self {
26687        Self::DEFAULT.clone()
26688    }
26689}
26690impl MessageData for RC_CHANNELS_OVERRIDE_DATA {
26691    type Message = MavMessage;
26692    const ID: u32 = 70u32;
26693    const NAME: &'static str = "RC_CHANNELS_OVERRIDE";
26694    const EXTRA_CRC: u8 = 124u8;
26695    const ENCODED_LEN: usize = 38usize;
26696    fn deser(
26697        _version: MavlinkVersion,
26698        __input: &[u8],
26699    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26700        let avail_len = __input.len();
26701        let mut payload_buf = [0; Self::ENCODED_LEN];
26702        let mut buf = if avail_len < Self::ENCODED_LEN {
26703            payload_buf[0..avail_len].copy_from_slice(__input);
26704            Bytes::new(&payload_buf)
26705        } else {
26706            Bytes::new(__input)
26707        };
26708        let mut __struct = Self::default();
26709        __struct.chan1_raw = buf.get_u16_le();
26710        __struct.chan2_raw = buf.get_u16_le();
26711        __struct.chan3_raw = buf.get_u16_le();
26712        __struct.chan4_raw = buf.get_u16_le();
26713        __struct.chan5_raw = buf.get_u16_le();
26714        __struct.chan6_raw = buf.get_u16_le();
26715        __struct.chan7_raw = buf.get_u16_le();
26716        __struct.chan8_raw = buf.get_u16_le();
26717        __struct.target_system = buf.get_u8();
26718        __struct.target_component = buf.get_u8();
26719        __struct.chan9_raw = buf.get_u16_le();
26720        __struct.chan10_raw = buf.get_u16_le();
26721        __struct.chan11_raw = buf.get_u16_le();
26722        __struct.chan12_raw = buf.get_u16_le();
26723        __struct.chan13_raw = buf.get_u16_le();
26724        __struct.chan14_raw = buf.get_u16_le();
26725        __struct.chan15_raw = buf.get_u16_le();
26726        __struct.chan16_raw = buf.get_u16_le();
26727        __struct.chan17_raw = buf.get_u16_le();
26728        __struct.chan18_raw = buf.get_u16_le();
26729        Ok(__struct)
26730    }
26731    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26732        let mut __tmp = BytesMut::new(bytes);
26733        #[allow(clippy::absurd_extreme_comparisons)]
26734        #[allow(unused_comparisons)]
26735        if __tmp.remaining() < Self::ENCODED_LEN {
26736            panic!(
26737                "buffer is too small (need {} bytes, but got {})",
26738                Self::ENCODED_LEN,
26739                __tmp.remaining(),
26740            )
26741        }
26742        __tmp.put_u16_le(self.chan1_raw);
26743        __tmp.put_u16_le(self.chan2_raw);
26744        __tmp.put_u16_le(self.chan3_raw);
26745        __tmp.put_u16_le(self.chan4_raw);
26746        __tmp.put_u16_le(self.chan5_raw);
26747        __tmp.put_u16_le(self.chan6_raw);
26748        __tmp.put_u16_le(self.chan7_raw);
26749        __tmp.put_u16_le(self.chan8_raw);
26750        __tmp.put_u8(self.target_system);
26751        __tmp.put_u8(self.target_component);
26752        if matches!(version, MavlinkVersion::V2) {
26753            __tmp.put_u16_le(self.chan9_raw);
26754            __tmp.put_u16_le(self.chan10_raw);
26755            __tmp.put_u16_le(self.chan11_raw);
26756            __tmp.put_u16_le(self.chan12_raw);
26757            __tmp.put_u16_le(self.chan13_raw);
26758            __tmp.put_u16_le(self.chan14_raw);
26759            __tmp.put_u16_le(self.chan15_raw);
26760            __tmp.put_u16_le(self.chan16_raw);
26761            __tmp.put_u16_le(self.chan17_raw);
26762            __tmp.put_u16_le(self.chan18_raw);
26763            let len = __tmp.len();
26764            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26765        } else {
26766            __tmp.len()
26767        }
26768    }
26769}
26770#[doc = "The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
26771#[doc = ""]
26772#[doc = "ID: 35"]
26773#[derive(Debug, Clone, PartialEq)]
26774#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26775#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26776#[cfg_attr(feature = "ts", derive(TS))]
26777#[cfg_attr(feature = "ts", ts(export))]
26778pub struct RC_CHANNELS_RAW_DATA {
26779    #[doc = "Timestamp (time since system boot)."]
26780    pub time_boot_ms: u32,
26781    #[doc = "RC channel 1 value."]
26782    pub chan1_raw: u16,
26783    #[doc = "RC channel 2 value."]
26784    pub chan2_raw: u16,
26785    #[doc = "RC channel 3 value."]
26786    pub chan3_raw: u16,
26787    #[doc = "RC channel 4 value."]
26788    pub chan4_raw: u16,
26789    #[doc = "RC channel 5 value."]
26790    pub chan5_raw: u16,
26791    #[doc = "RC channel 6 value."]
26792    pub chan6_raw: u16,
26793    #[doc = "RC channel 7 value."]
26794    pub chan7_raw: u16,
26795    #[doc = "RC channel 8 value."]
26796    pub chan8_raw: u16,
26797    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
26798    pub port: u8,
26799    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
26800    pub rssi: u8,
26801}
26802impl RC_CHANNELS_RAW_DATA {
26803    pub const ENCODED_LEN: usize = 22usize;
26804    pub const DEFAULT: Self = Self {
26805        time_boot_ms: 0_u32,
26806        chan1_raw: 0_u16,
26807        chan2_raw: 0_u16,
26808        chan3_raw: 0_u16,
26809        chan4_raw: 0_u16,
26810        chan5_raw: 0_u16,
26811        chan6_raw: 0_u16,
26812        chan7_raw: 0_u16,
26813        chan8_raw: 0_u16,
26814        port: 0_u8,
26815        rssi: 0_u8,
26816    };
26817    #[cfg(feature = "arbitrary")]
26818    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26819        use arbitrary::{Arbitrary, Unstructured};
26820        let mut buf = [0u8; 1024];
26821        rng.fill_bytes(&mut buf);
26822        let mut unstructured = Unstructured::new(&buf);
26823        Self::arbitrary(&mut unstructured).unwrap_or_default()
26824    }
26825}
26826impl Default for RC_CHANNELS_RAW_DATA {
26827    fn default() -> Self {
26828        Self::DEFAULT.clone()
26829    }
26830}
26831impl MessageData for RC_CHANNELS_RAW_DATA {
26832    type Message = MavMessage;
26833    const ID: u32 = 35u32;
26834    const NAME: &'static str = "RC_CHANNELS_RAW";
26835    const EXTRA_CRC: u8 = 244u8;
26836    const ENCODED_LEN: usize = 22usize;
26837    fn deser(
26838        _version: MavlinkVersion,
26839        __input: &[u8],
26840    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26841        let avail_len = __input.len();
26842        let mut payload_buf = [0; Self::ENCODED_LEN];
26843        let mut buf = if avail_len < Self::ENCODED_LEN {
26844            payload_buf[0..avail_len].copy_from_slice(__input);
26845            Bytes::new(&payload_buf)
26846        } else {
26847            Bytes::new(__input)
26848        };
26849        let mut __struct = Self::default();
26850        __struct.time_boot_ms = buf.get_u32_le();
26851        __struct.chan1_raw = buf.get_u16_le();
26852        __struct.chan2_raw = buf.get_u16_le();
26853        __struct.chan3_raw = buf.get_u16_le();
26854        __struct.chan4_raw = buf.get_u16_le();
26855        __struct.chan5_raw = buf.get_u16_le();
26856        __struct.chan6_raw = buf.get_u16_le();
26857        __struct.chan7_raw = buf.get_u16_le();
26858        __struct.chan8_raw = buf.get_u16_le();
26859        __struct.port = buf.get_u8();
26860        __struct.rssi = buf.get_u8();
26861        Ok(__struct)
26862    }
26863    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26864        let mut __tmp = BytesMut::new(bytes);
26865        #[allow(clippy::absurd_extreme_comparisons)]
26866        #[allow(unused_comparisons)]
26867        if __tmp.remaining() < Self::ENCODED_LEN {
26868            panic!(
26869                "buffer is too small (need {} bytes, but got {})",
26870                Self::ENCODED_LEN,
26871                __tmp.remaining(),
26872            )
26873        }
26874        __tmp.put_u32_le(self.time_boot_ms);
26875        __tmp.put_u16_le(self.chan1_raw);
26876        __tmp.put_u16_le(self.chan2_raw);
26877        __tmp.put_u16_le(self.chan3_raw);
26878        __tmp.put_u16_le(self.chan4_raw);
26879        __tmp.put_u16_le(self.chan5_raw);
26880        __tmp.put_u16_le(self.chan6_raw);
26881        __tmp.put_u16_le(self.chan7_raw);
26882        __tmp.put_u16_le(self.chan8_raw);
26883        __tmp.put_u8(self.port);
26884        __tmp.put_u8(self.rssi);
26885        if matches!(version, MavlinkVersion::V2) {
26886            let len = __tmp.len();
26887            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26888        } else {
26889            __tmp.len()
26890        }
26891    }
26892}
26893#[doc = "The scaled values of the RC channels received: (-100%) -10000, (0%) 0, (100%) 10000. Channels that are inactive should be set to INT16_MAX."]
26894#[doc = ""]
26895#[doc = "ID: 34"]
26896#[derive(Debug, Clone, PartialEq)]
26897#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26898#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26899#[cfg_attr(feature = "ts", derive(TS))]
26900#[cfg_attr(feature = "ts", ts(export))]
26901pub struct RC_CHANNELS_SCALED_DATA {
26902    #[doc = "Timestamp (time since system boot)."]
26903    pub time_boot_ms: u32,
26904    #[doc = "RC channel 1 value scaled."]
26905    pub chan1_scaled: i16,
26906    #[doc = "RC channel 2 value scaled."]
26907    pub chan2_scaled: i16,
26908    #[doc = "RC channel 3 value scaled."]
26909    pub chan3_scaled: i16,
26910    #[doc = "RC channel 4 value scaled."]
26911    pub chan4_scaled: i16,
26912    #[doc = "RC channel 5 value scaled."]
26913    pub chan5_scaled: i16,
26914    #[doc = "RC channel 6 value scaled."]
26915    pub chan6_scaled: i16,
26916    #[doc = "RC channel 7 value scaled."]
26917    pub chan7_scaled: i16,
26918    #[doc = "RC channel 8 value scaled."]
26919    pub chan8_scaled: i16,
26920    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
26921    pub port: u8,
26922    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
26923    pub rssi: u8,
26924}
26925impl RC_CHANNELS_SCALED_DATA {
26926    pub const ENCODED_LEN: usize = 22usize;
26927    pub const DEFAULT: Self = Self {
26928        time_boot_ms: 0_u32,
26929        chan1_scaled: 0_i16,
26930        chan2_scaled: 0_i16,
26931        chan3_scaled: 0_i16,
26932        chan4_scaled: 0_i16,
26933        chan5_scaled: 0_i16,
26934        chan6_scaled: 0_i16,
26935        chan7_scaled: 0_i16,
26936        chan8_scaled: 0_i16,
26937        port: 0_u8,
26938        rssi: 0_u8,
26939    };
26940    #[cfg(feature = "arbitrary")]
26941    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26942        use arbitrary::{Arbitrary, Unstructured};
26943        let mut buf = [0u8; 1024];
26944        rng.fill_bytes(&mut buf);
26945        let mut unstructured = Unstructured::new(&buf);
26946        Self::arbitrary(&mut unstructured).unwrap_or_default()
26947    }
26948}
26949impl Default for RC_CHANNELS_SCALED_DATA {
26950    fn default() -> Self {
26951        Self::DEFAULT.clone()
26952    }
26953}
26954impl MessageData for RC_CHANNELS_SCALED_DATA {
26955    type Message = MavMessage;
26956    const ID: u32 = 34u32;
26957    const NAME: &'static str = "RC_CHANNELS_SCALED";
26958    const EXTRA_CRC: u8 = 237u8;
26959    const ENCODED_LEN: usize = 22usize;
26960    fn deser(
26961        _version: MavlinkVersion,
26962        __input: &[u8],
26963    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26964        let avail_len = __input.len();
26965        let mut payload_buf = [0; Self::ENCODED_LEN];
26966        let mut buf = if avail_len < Self::ENCODED_LEN {
26967            payload_buf[0..avail_len].copy_from_slice(__input);
26968            Bytes::new(&payload_buf)
26969        } else {
26970            Bytes::new(__input)
26971        };
26972        let mut __struct = Self::default();
26973        __struct.time_boot_ms = buf.get_u32_le();
26974        __struct.chan1_scaled = buf.get_i16_le();
26975        __struct.chan2_scaled = buf.get_i16_le();
26976        __struct.chan3_scaled = buf.get_i16_le();
26977        __struct.chan4_scaled = buf.get_i16_le();
26978        __struct.chan5_scaled = buf.get_i16_le();
26979        __struct.chan6_scaled = buf.get_i16_le();
26980        __struct.chan7_scaled = buf.get_i16_le();
26981        __struct.chan8_scaled = buf.get_i16_le();
26982        __struct.port = buf.get_u8();
26983        __struct.rssi = buf.get_u8();
26984        Ok(__struct)
26985    }
26986    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26987        let mut __tmp = BytesMut::new(bytes);
26988        #[allow(clippy::absurd_extreme_comparisons)]
26989        #[allow(unused_comparisons)]
26990        if __tmp.remaining() < Self::ENCODED_LEN {
26991            panic!(
26992                "buffer is too small (need {} bytes, but got {})",
26993                Self::ENCODED_LEN,
26994                __tmp.remaining(),
26995            )
26996        }
26997        __tmp.put_u32_le(self.time_boot_ms);
26998        __tmp.put_i16_le(self.chan1_scaled);
26999        __tmp.put_i16_le(self.chan2_scaled);
27000        __tmp.put_i16_le(self.chan3_scaled);
27001        __tmp.put_i16_le(self.chan4_scaled);
27002        __tmp.put_i16_le(self.chan5_scaled);
27003        __tmp.put_i16_le(self.chan6_scaled);
27004        __tmp.put_i16_le(self.chan7_scaled);
27005        __tmp.put_i16_le(self.chan8_scaled);
27006        __tmp.put_u8(self.port);
27007        __tmp.put_u8(self.rssi);
27008        if matches!(version, MavlinkVersion::V2) {
27009            let len = __tmp.len();
27010            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27011        } else {
27012            __tmp.len()
27013        }
27014    }
27015}
27016#[deprecated = " See `MAV_CMD_SET_MESSAGE_INTERVAL ` (Deprecated since 2015-08)"]
27017#[doc = "Request a data stream."]
27018#[doc = ""]
27019#[doc = "ID: 66"]
27020#[derive(Debug, Clone, PartialEq)]
27021#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27022#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27023#[cfg_attr(feature = "ts", derive(TS))]
27024#[cfg_attr(feature = "ts", ts(export))]
27025pub struct REQUEST_DATA_STREAM_DATA {
27026    #[doc = "The requested message rate"]
27027    pub req_message_rate: u16,
27028    #[doc = "The target requested to send the message stream."]
27029    pub target_system: u8,
27030    #[doc = "The target requested to send the message stream."]
27031    pub target_component: u8,
27032    #[doc = "The ID of the requested data stream"]
27033    pub req_stream_id: u8,
27034    #[doc = "1 to start sending, 0 to stop sending."]
27035    pub start_stop: u8,
27036}
27037impl REQUEST_DATA_STREAM_DATA {
27038    pub const ENCODED_LEN: usize = 6usize;
27039    pub const DEFAULT: Self = Self {
27040        req_message_rate: 0_u16,
27041        target_system: 0_u8,
27042        target_component: 0_u8,
27043        req_stream_id: 0_u8,
27044        start_stop: 0_u8,
27045    };
27046    #[cfg(feature = "arbitrary")]
27047    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27048        use arbitrary::{Arbitrary, Unstructured};
27049        let mut buf = [0u8; 1024];
27050        rng.fill_bytes(&mut buf);
27051        let mut unstructured = Unstructured::new(&buf);
27052        Self::arbitrary(&mut unstructured).unwrap_or_default()
27053    }
27054}
27055impl Default for REQUEST_DATA_STREAM_DATA {
27056    fn default() -> Self {
27057        Self::DEFAULT.clone()
27058    }
27059}
27060impl MessageData for REQUEST_DATA_STREAM_DATA {
27061    type Message = MavMessage;
27062    const ID: u32 = 66u32;
27063    const NAME: &'static str = "REQUEST_DATA_STREAM";
27064    const EXTRA_CRC: u8 = 148u8;
27065    const ENCODED_LEN: usize = 6usize;
27066    fn deser(
27067        _version: MavlinkVersion,
27068        __input: &[u8],
27069    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27070        let avail_len = __input.len();
27071        let mut payload_buf = [0; Self::ENCODED_LEN];
27072        let mut buf = if avail_len < Self::ENCODED_LEN {
27073            payload_buf[0..avail_len].copy_from_slice(__input);
27074            Bytes::new(&payload_buf)
27075        } else {
27076            Bytes::new(__input)
27077        };
27078        let mut __struct = Self::default();
27079        __struct.req_message_rate = buf.get_u16_le();
27080        __struct.target_system = buf.get_u8();
27081        __struct.target_component = buf.get_u8();
27082        __struct.req_stream_id = buf.get_u8();
27083        __struct.start_stop = buf.get_u8();
27084        Ok(__struct)
27085    }
27086    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27087        let mut __tmp = BytesMut::new(bytes);
27088        #[allow(clippy::absurd_extreme_comparisons)]
27089        #[allow(unused_comparisons)]
27090        if __tmp.remaining() < Self::ENCODED_LEN {
27091            panic!(
27092                "buffer is too small (need {} bytes, but got {})",
27093                Self::ENCODED_LEN,
27094                __tmp.remaining(),
27095            )
27096        }
27097        __tmp.put_u16_le(self.req_message_rate);
27098        __tmp.put_u8(self.target_system);
27099        __tmp.put_u8(self.target_component);
27100        __tmp.put_u8(self.req_stream_id);
27101        __tmp.put_u8(self.start_stop);
27102        if matches!(version, MavlinkVersion::V2) {
27103            let len = __tmp.len();
27104            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27105        } else {
27106            __tmp.len()
27107        }
27108    }
27109}
27110#[doc = "Request one or more events to be (re-)sent. If first_sequence==last_sequence, only a single event is requested. Note that first_sequence can be larger than last_sequence (because the sequence number can wrap). Each sequence will trigger an EVENT or EVENT_ERROR response."]
27111#[doc = ""]
27112#[doc = "ID: 412"]
27113#[derive(Debug, Clone, PartialEq)]
27114#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27115#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27116#[cfg_attr(feature = "ts", derive(TS))]
27117#[cfg_attr(feature = "ts", ts(export))]
27118pub struct REQUEST_EVENT_DATA {
27119    #[doc = "First sequence number of the requested event."]
27120    pub first_sequence: u16,
27121    #[doc = "Last sequence number of the requested event."]
27122    pub last_sequence: u16,
27123    #[doc = "System ID"]
27124    pub target_system: u8,
27125    #[doc = "Component ID"]
27126    pub target_component: u8,
27127}
27128impl REQUEST_EVENT_DATA {
27129    pub const ENCODED_LEN: usize = 6usize;
27130    pub const DEFAULT: Self = Self {
27131        first_sequence: 0_u16,
27132        last_sequence: 0_u16,
27133        target_system: 0_u8,
27134        target_component: 0_u8,
27135    };
27136    #[cfg(feature = "arbitrary")]
27137    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27138        use arbitrary::{Arbitrary, Unstructured};
27139        let mut buf = [0u8; 1024];
27140        rng.fill_bytes(&mut buf);
27141        let mut unstructured = Unstructured::new(&buf);
27142        Self::arbitrary(&mut unstructured).unwrap_or_default()
27143    }
27144}
27145impl Default for REQUEST_EVENT_DATA {
27146    fn default() -> Self {
27147        Self::DEFAULT.clone()
27148    }
27149}
27150impl MessageData for REQUEST_EVENT_DATA {
27151    type Message = MavMessage;
27152    const ID: u32 = 412u32;
27153    const NAME: &'static str = "REQUEST_EVENT";
27154    const EXTRA_CRC: u8 = 33u8;
27155    const ENCODED_LEN: usize = 6usize;
27156    fn deser(
27157        _version: MavlinkVersion,
27158        __input: &[u8],
27159    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27160        let avail_len = __input.len();
27161        let mut payload_buf = [0; Self::ENCODED_LEN];
27162        let mut buf = if avail_len < Self::ENCODED_LEN {
27163            payload_buf[0..avail_len].copy_from_slice(__input);
27164            Bytes::new(&payload_buf)
27165        } else {
27166            Bytes::new(__input)
27167        };
27168        let mut __struct = Self::default();
27169        __struct.first_sequence = buf.get_u16_le();
27170        __struct.last_sequence = buf.get_u16_le();
27171        __struct.target_system = buf.get_u8();
27172        __struct.target_component = buf.get_u8();
27173        Ok(__struct)
27174    }
27175    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27176        let mut __tmp = BytesMut::new(bytes);
27177        #[allow(clippy::absurd_extreme_comparisons)]
27178        #[allow(unused_comparisons)]
27179        if __tmp.remaining() < Self::ENCODED_LEN {
27180            panic!(
27181                "buffer is too small (need {} bytes, but got {})",
27182                Self::ENCODED_LEN,
27183                __tmp.remaining(),
27184            )
27185        }
27186        __tmp.put_u16_le(self.first_sequence);
27187        __tmp.put_u16_le(self.last_sequence);
27188        __tmp.put_u8(self.target_system);
27189        __tmp.put_u8(self.target_component);
27190        if matches!(version, MavlinkVersion::V2) {
27191            let len = __tmp.len();
27192            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27193        } else {
27194            __tmp.len()
27195        }
27196    }
27197}
27198#[doc = "The autopilot is requesting a resource (file, binary, other type of data)."]
27199#[doc = ""]
27200#[doc = "ID: 142"]
27201#[derive(Debug, Clone, PartialEq)]
27202#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27203#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27204#[cfg_attr(feature = "ts", derive(TS))]
27205#[cfg_attr(feature = "ts", ts(export))]
27206pub struct RESOURCE_REQUEST_DATA {
27207    #[doc = "Request ID. This ID should be re-used when sending back URI contents"]
27208    pub request_id: u8,
27209    #[doc = "The type of requested URI. 0 = a file via URL. 1 = a UAVCAN binary"]
27210    pub uri_type: u8,
27211    #[doc = "The requested unique resource identifier (URI). It is not necessarily a straight domain name (depends on the URI type enum)"]
27212    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27213    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27214    pub uri: [u8; 120],
27215    #[doc = "The way the autopilot wants to receive the URI. 0 = MAVLink FTP. 1 = binary stream."]
27216    pub transfer_type: u8,
27217    #[doc = "The storage path the autopilot wants the URI to be stored in. Will only be valid if the transfer_type has a storage associated (e.g. MAVLink FTP)."]
27218    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27219    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27220    pub storage: [u8; 120],
27221}
27222impl RESOURCE_REQUEST_DATA {
27223    pub const ENCODED_LEN: usize = 243usize;
27224    pub const DEFAULT: Self = Self {
27225        request_id: 0_u8,
27226        uri_type: 0_u8,
27227        uri: [0_u8; 120usize],
27228        transfer_type: 0_u8,
27229        storage: [0_u8; 120usize],
27230    };
27231    #[cfg(feature = "arbitrary")]
27232    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27233        use arbitrary::{Arbitrary, Unstructured};
27234        let mut buf = [0u8; 1024];
27235        rng.fill_bytes(&mut buf);
27236        let mut unstructured = Unstructured::new(&buf);
27237        Self::arbitrary(&mut unstructured).unwrap_or_default()
27238    }
27239}
27240impl Default for RESOURCE_REQUEST_DATA {
27241    fn default() -> Self {
27242        Self::DEFAULT.clone()
27243    }
27244}
27245impl MessageData for RESOURCE_REQUEST_DATA {
27246    type Message = MavMessage;
27247    const ID: u32 = 142u32;
27248    const NAME: &'static str = "RESOURCE_REQUEST";
27249    const EXTRA_CRC: u8 = 72u8;
27250    const ENCODED_LEN: usize = 243usize;
27251    fn deser(
27252        _version: MavlinkVersion,
27253        __input: &[u8],
27254    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27255        let avail_len = __input.len();
27256        let mut payload_buf = [0; Self::ENCODED_LEN];
27257        let mut buf = if avail_len < Self::ENCODED_LEN {
27258            payload_buf[0..avail_len].copy_from_slice(__input);
27259            Bytes::new(&payload_buf)
27260        } else {
27261            Bytes::new(__input)
27262        };
27263        let mut __struct = Self::default();
27264        __struct.request_id = buf.get_u8();
27265        __struct.uri_type = buf.get_u8();
27266        for v in &mut __struct.uri {
27267            let val = buf.get_u8();
27268            *v = val;
27269        }
27270        __struct.transfer_type = buf.get_u8();
27271        for v in &mut __struct.storage {
27272            let val = buf.get_u8();
27273            *v = val;
27274        }
27275        Ok(__struct)
27276    }
27277    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27278        let mut __tmp = BytesMut::new(bytes);
27279        #[allow(clippy::absurd_extreme_comparisons)]
27280        #[allow(unused_comparisons)]
27281        if __tmp.remaining() < Self::ENCODED_LEN {
27282            panic!(
27283                "buffer is too small (need {} bytes, but got {})",
27284                Self::ENCODED_LEN,
27285                __tmp.remaining(),
27286            )
27287        }
27288        __tmp.put_u8(self.request_id);
27289        __tmp.put_u8(self.uri_type);
27290        for val in &self.uri {
27291            __tmp.put_u8(*val);
27292        }
27293        __tmp.put_u8(self.transfer_type);
27294        for val in &self.storage {
27295            __tmp.put_u8(*val);
27296        }
27297        if matches!(version, MavlinkVersion::V2) {
27298            let len = __tmp.len();
27299            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27300        } else {
27301            __tmp.len()
27302        }
27303    }
27304}
27305#[doc = "Response to a REQUEST_EVENT in case of an error (e.g. the event is not available anymore)."]
27306#[doc = ""]
27307#[doc = "ID: 413"]
27308#[derive(Debug, Clone, PartialEq)]
27309#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27310#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27311#[cfg_attr(feature = "ts", derive(TS))]
27312#[cfg_attr(feature = "ts", ts(export))]
27313pub struct RESPONSE_EVENT_ERROR_DATA {
27314    #[doc = "Sequence number."]
27315    pub sequence: u16,
27316    #[doc = "Oldest Sequence number that is still available after the sequence set in REQUEST_EVENT."]
27317    pub sequence_oldest_available: u16,
27318    #[doc = "System ID"]
27319    pub target_system: u8,
27320    #[doc = "Component ID"]
27321    pub target_component: u8,
27322    #[doc = "Error reason."]
27323    pub reason: MavEventErrorReason,
27324}
27325impl RESPONSE_EVENT_ERROR_DATA {
27326    pub const ENCODED_LEN: usize = 7usize;
27327    pub const DEFAULT: Self = Self {
27328        sequence: 0_u16,
27329        sequence_oldest_available: 0_u16,
27330        target_system: 0_u8,
27331        target_component: 0_u8,
27332        reason: MavEventErrorReason::DEFAULT,
27333    };
27334    #[cfg(feature = "arbitrary")]
27335    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27336        use arbitrary::{Arbitrary, Unstructured};
27337        let mut buf = [0u8; 1024];
27338        rng.fill_bytes(&mut buf);
27339        let mut unstructured = Unstructured::new(&buf);
27340        Self::arbitrary(&mut unstructured).unwrap_or_default()
27341    }
27342}
27343impl Default for RESPONSE_EVENT_ERROR_DATA {
27344    fn default() -> Self {
27345        Self::DEFAULT.clone()
27346    }
27347}
27348impl MessageData for RESPONSE_EVENT_ERROR_DATA {
27349    type Message = MavMessage;
27350    const ID: u32 = 413u32;
27351    const NAME: &'static str = "RESPONSE_EVENT_ERROR";
27352    const EXTRA_CRC: u8 = 77u8;
27353    const ENCODED_LEN: usize = 7usize;
27354    fn deser(
27355        _version: MavlinkVersion,
27356        __input: &[u8],
27357    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27358        let avail_len = __input.len();
27359        let mut payload_buf = [0; Self::ENCODED_LEN];
27360        let mut buf = if avail_len < Self::ENCODED_LEN {
27361            payload_buf[0..avail_len].copy_from_slice(__input);
27362            Bytes::new(&payload_buf)
27363        } else {
27364            Bytes::new(__input)
27365        };
27366        let mut __struct = Self::default();
27367        __struct.sequence = buf.get_u16_le();
27368        __struct.sequence_oldest_available = buf.get_u16_le();
27369        __struct.target_system = buf.get_u8();
27370        __struct.target_component = buf.get_u8();
27371        let tmp = buf.get_u8();
27372        __struct.reason =
27373            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27374                enum_type: "MavEventErrorReason",
27375                value: tmp as u32,
27376            })?;
27377        Ok(__struct)
27378    }
27379    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27380        let mut __tmp = BytesMut::new(bytes);
27381        #[allow(clippy::absurd_extreme_comparisons)]
27382        #[allow(unused_comparisons)]
27383        if __tmp.remaining() < Self::ENCODED_LEN {
27384            panic!(
27385                "buffer is too small (need {} bytes, but got {})",
27386                Self::ENCODED_LEN,
27387                __tmp.remaining(),
27388            )
27389        }
27390        __tmp.put_u16_le(self.sequence);
27391        __tmp.put_u16_le(self.sequence_oldest_available);
27392        __tmp.put_u8(self.target_system);
27393        __tmp.put_u8(self.target_component);
27394        __tmp.put_u8(self.reason as u8);
27395        if matches!(version, MavlinkVersion::V2) {
27396            let len = __tmp.len();
27397            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27398        } else {
27399            __tmp.len()
27400        }
27401    }
27402}
27403#[doc = "Read out the safety zone the MAV currently assumes."]
27404#[doc = ""]
27405#[doc = "ID: 55"]
27406#[derive(Debug, Clone, PartialEq)]
27407#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27408#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27409#[cfg_attr(feature = "ts", derive(TS))]
27410#[cfg_attr(feature = "ts", ts(export))]
27411pub struct SAFETY_ALLOWED_AREA_DATA {
27412    #[doc = "x position 1 / Latitude 1"]
27413    pub p1x: f32,
27414    #[doc = "y position 1 / Longitude 1"]
27415    pub p1y: f32,
27416    #[doc = "z position 1 / Altitude 1"]
27417    pub p1z: f32,
27418    #[doc = "x position 2 / Latitude 2"]
27419    pub p2x: f32,
27420    #[doc = "y position 2 / Longitude 2"]
27421    pub p2y: f32,
27422    #[doc = "z position 2 / Altitude 2"]
27423    pub p2z: f32,
27424    #[doc = "Coordinate frame. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down."]
27425    pub frame: MavFrame,
27426}
27427impl SAFETY_ALLOWED_AREA_DATA {
27428    pub const ENCODED_LEN: usize = 25usize;
27429    pub const DEFAULT: Self = Self {
27430        p1x: 0.0_f32,
27431        p1y: 0.0_f32,
27432        p1z: 0.0_f32,
27433        p2x: 0.0_f32,
27434        p2y: 0.0_f32,
27435        p2z: 0.0_f32,
27436        frame: MavFrame::DEFAULT,
27437    };
27438    #[cfg(feature = "arbitrary")]
27439    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27440        use arbitrary::{Arbitrary, Unstructured};
27441        let mut buf = [0u8; 1024];
27442        rng.fill_bytes(&mut buf);
27443        let mut unstructured = Unstructured::new(&buf);
27444        Self::arbitrary(&mut unstructured).unwrap_or_default()
27445    }
27446}
27447impl Default for SAFETY_ALLOWED_AREA_DATA {
27448    fn default() -> Self {
27449        Self::DEFAULT.clone()
27450    }
27451}
27452impl MessageData for SAFETY_ALLOWED_AREA_DATA {
27453    type Message = MavMessage;
27454    const ID: u32 = 55u32;
27455    const NAME: &'static str = "SAFETY_ALLOWED_AREA";
27456    const EXTRA_CRC: u8 = 3u8;
27457    const ENCODED_LEN: usize = 25usize;
27458    fn deser(
27459        _version: MavlinkVersion,
27460        __input: &[u8],
27461    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27462        let avail_len = __input.len();
27463        let mut payload_buf = [0; Self::ENCODED_LEN];
27464        let mut buf = if avail_len < Self::ENCODED_LEN {
27465            payload_buf[0..avail_len].copy_from_slice(__input);
27466            Bytes::new(&payload_buf)
27467        } else {
27468            Bytes::new(__input)
27469        };
27470        let mut __struct = Self::default();
27471        __struct.p1x = buf.get_f32_le();
27472        __struct.p1y = buf.get_f32_le();
27473        __struct.p1z = buf.get_f32_le();
27474        __struct.p2x = buf.get_f32_le();
27475        __struct.p2y = buf.get_f32_le();
27476        __struct.p2z = buf.get_f32_le();
27477        let tmp = buf.get_u8();
27478        __struct.frame =
27479            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27480                enum_type: "MavFrame",
27481                value: tmp as u32,
27482            })?;
27483        Ok(__struct)
27484    }
27485    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27486        let mut __tmp = BytesMut::new(bytes);
27487        #[allow(clippy::absurd_extreme_comparisons)]
27488        #[allow(unused_comparisons)]
27489        if __tmp.remaining() < Self::ENCODED_LEN {
27490            panic!(
27491                "buffer is too small (need {} bytes, but got {})",
27492                Self::ENCODED_LEN,
27493                __tmp.remaining(),
27494            )
27495        }
27496        __tmp.put_f32_le(self.p1x);
27497        __tmp.put_f32_le(self.p1y);
27498        __tmp.put_f32_le(self.p1z);
27499        __tmp.put_f32_le(self.p2x);
27500        __tmp.put_f32_le(self.p2y);
27501        __tmp.put_f32_le(self.p2z);
27502        __tmp.put_u8(self.frame as u8);
27503        if matches!(version, MavlinkVersion::V2) {
27504            let len = __tmp.len();
27505            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27506        } else {
27507            __tmp.len()
27508        }
27509    }
27510}
27511#[doc = "Set a safety zone (volume), which is defined by two corners of a cube. This message can be used to tell the MAV which setpoints/waypoints to accept and which to reject. Safety areas are often enforced by national or competition regulations."]
27512#[doc = ""]
27513#[doc = "ID: 54"]
27514#[derive(Debug, Clone, PartialEq)]
27515#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27516#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27517#[cfg_attr(feature = "ts", derive(TS))]
27518#[cfg_attr(feature = "ts", ts(export))]
27519pub struct SAFETY_SET_ALLOWED_AREA_DATA {
27520    #[doc = "x position 1 / Latitude 1"]
27521    pub p1x: f32,
27522    #[doc = "y position 1 / Longitude 1"]
27523    pub p1y: f32,
27524    #[doc = "z position 1 / Altitude 1"]
27525    pub p1z: f32,
27526    #[doc = "x position 2 / Latitude 2"]
27527    pub p2x: f32,
27528    #[doc = "y position 2 / Longitude 2"]
27529    pub p2y: f32,
27530    #[doc = "z position 2 / Altitude 2"]
27531    pub p2z: f32,
27532    #[doc = "System ID"]
27533    pub target_system: u8,
27534    #[doc = "Component ID"]
27535    pub target_component: u8,
27536    #[doc = "Coordinate frame. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down."]
27537    pub frame: MavFrame,
27538}
27539impl SAFETY_SET_ALLOWED_AREA_DATA {
27540    pub const ENCODED_LEN: usize = 27usize;
27541    pub const DEFAULT: Self = Self {
27542        p1x: 0.0_f32,
27543        p1y: 0.0_f32,
27544        p1z: 0.0_f32,
27545        p2x: 0.0_f32,
27546        p2y: 0.0_f32,
27547        p2z: 0.0_f32,
27548        target_system: 0_u8,
27549        target_component: 0_u8,
27550        frame: MavFrame::DEFAULT,
27551    };
27552    #[cfg(feature = "arbitrary")]
27553    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27554        use arbitrary::{Arbitrary, Unstructured};
27555        let mut buf = [0u8; 1024];
27556        rng.fill_bytes(&mut buf);
27557        let mut unstructured = Unstructured::new(&buf);
27558        Self::arbitrary(&mut unstructured).unwrap_or_default()
27559    }
27560}
27561impl Default for SAFETY_SET_ALLOWED_AREA_DATA {
27562    fn default() -> Self {
27563        Self::DEFAULT.clone()
27564    }
27565}
27566impl MessageData for SAFETY_SET_ALLOWED_AREA_DATA {
27567    type Message = MavMessage;
27568    const ID: u32 = 54u32;
27569    const NAME: &'static str = "SAFETY_SET_ALLOWED_AREA";
27570    const EXTRA_CRC: u8 = 15u8;
27571    const ENCODED_LEN: usize = 27usize;
27572    fn deser(
27573        _version: MavlinkVersion,
27574        __input: &[u8],
27575    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27576        let avail_len = __input.len();
27577        let mut payload_buf = [0; Self::ENCODED_LEN];
27578        let mut buf = if avail_len < Self::ENCODED_LEN {
27579            payload_buf[0..avail_len].copy_from_slice(__input);
27580            Bytes::new(&payload_buf)
27581        } else {
27582            Bytes::new(__input)
27583        };
27584        let mut __struct = Self::default();
27585        __struct.p1x = buf.get_f32_le();
27586        __struct.p1y = buf.get_f32_le();
27587        __struct.p1z = buf.get_f32_le();
27588        __struct.p2x = buf.get_f32_le();
27589        __struct.p2y = buf.get_f32_le();
27590        __struct.p2z = buf.get_f32_le();
27591        __struct.target_system = buf.get_u8();
27592        __struct.target_component = buf.get_u8();
27593        let tmp = buf.get_u8();
27594        __struct.frame =
27595            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27596                enum_type: "MavFrame",
27597                value: tmp as u32,
27598            })?;
27599        Ok(__struct)
27600    }
27601    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27602        let mut __tmp = BytesMut::new(bytes);
27603        #[allow(clippy::absurd_extreme_comparisons)]
27604        #[allow(unused_comparisons)]
27605        if __tmp.remaining() < Self::ENCODED_LEN {
27606            panic!(
27607                "buffer is too small (need {} bytes, but got {})",
27608                Self::ENCODED_LEN,
27609                __tmp.remaining(),
27610            )
27611        }
27612        __tmp.put_f32_le(self.p1x);
27613        __tmp.put_f32_le(self.p1y);
27614        __tmp.put_f32_le(self.p1z);
27615        __tmp.put_f32_le(self.p2x);
27616        __tmp.put_f32_le(self.p2y);
27617        __tmp.put_f32_le(self.p2z);
27618        __tmp.put_u8(self.target_system);
27619        __tmp.put_u8(self.target_component);
27620        __tmp.put_u8(self.frame as u8);
27621        if matches!(version, MavlinkVersion::V2) {
27622            let len = __tmp.len();
27623            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27624        } else {
27625            __tmp.len()
27626        }
27627    }
27628}
27629#[doc = "Status of the SatCom link."]
27630#[doc = ""]
27631#[doc = "ID: 8015"]
27632#[derive(Debug, Clone, PartialEq)]
27633#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27634#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27635#[cfg_attr(feature = "ts", derive(TS))]
27636#[cfg_attr(feature = "ts", ts(export))]
27637pub struct SATCOM_LINK_STATUS_DATA {
27638    #[doc = "Timestamp"]
27639    pub timestamp: u64,
27640    #[doc = "Timestamp of the last successful sbd session"]
27641    pub last_heartbeat: u64,
27642    #[doc = "Number of failed sessions"]
27643    pub failed_sessions: u16,
27644    #[doc = "Number of successful sessions"]
27645    pub successful_sessions: u16,
27646    #[doc = "Signal quality"]
27647    pub signal_quality: u8,
27648    #[doc = "Ring call pending"]
27649    pub ring_pending: u8,
27650    #[doc = "Transmission session pending"]
27651    pub tx_session_pending: u8,
27652    #[doc = "Receiving session pending"]
27653    pub rx_session_pending: u8,
27654}
27655impl SATCOM_LINK_STATUS_DATA {
27656    pub const ENCODED_LEN: usize = 24usize;
27657    pub const DEFAULT: Self = Self {
27658        timestamp: 0_u64,
27659        last_heartbeat: 0_u64,
27660        failed_sessions: 0_u16,
27661        successful_sessions: 0_u16,
27662        signal_quality: 0_u8,
27663        ring_pending: 0_u8,
27664        tx_session_pending: 0_u8,
27665        rx_session_pending: 0_u8,
27666    };
27667    #[cfg(feature = "arbitrary")]
27668    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27669        use arbitrary::{Arbitrary, Unstructured};
27670        let mut buf = [0u8; 1024];
27671        rng.fill_bytes(&mut buf);
27672        let mut unstructured = Unstructured::new(&buf);
27673        Self::arbitrary(&mut unstructured).unwrap_or_default()
27674    }
27675}
27676impl Default for SATCOM_LINK_STATUS_DATA {
27677    fn default() -> Self {
27678        Self::DEFAULT.clone()
27679    }
27680}
27681impl MessageData for SATCOM_LINK_STATUS_DATA {
27682    type Message = MavMessage;
27683    const ID: u32 = 8015u32;
27684    const NAME: &'static str = "SATCOM_LINK_STATUS";
27685    const EXTRA_CRC: u8 = 23u8;
27686    const ENCODED_LEN: usize = 24usize;
27687    fn deser(
27688        _version: MavlinkVersion,
27689        __input: &[u8],
27690    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27691        let avail_len = __input.len();
27692        let mut payload_buf = [0; Self::ENCODED_LEN];
27693        let mut buf = if avail_len < Self::ENCODED_LEN {
27694            payload_buf[0..avail_len].copy_from_slice(__input);
27695            Bytes::new(&payload_buf)
27696        } else {
27697            Bytes::new(__input)
27698        };
27699        let mut __struct = Self::default();
27700        __struct.timestamp = buf.get_u64_le();
27701        __struct.last_heartbeat = buf.get_u64_le();
27702        __struct.failed_sessions = buf.get_u16_le();
27703        __struct.successful_sessions = buf.get_u16_le();
27704        __struct.signal_quality = buf.get_u8();
27705        __struct.ring_pending = buf.get_u8();
27706        __struct.tx_session_pending = buf.get_u8();
27707        __struct.rx_session_pending = buf.get_u8();
27708        Ok(__struct)
27709    }
27710    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27711        let mut __tmp = BytesMut::new(bytes);
27712        #[allow(clippy::absurd_extreme_comparisons)]
27713        #[allow(unused_comparisons)]
27714        if __tmp.remaining() < Self::ENCODED_LEN {
27715            panic!(
27716                "buffer is too small (need {} bytes, but got {})",
27717                Self::ENCODED_LEN,
27718                __tmp.remaining(),
27719            )
27720        }
27721        __tmp.put_u64_le(self.timestamp);
27722        __tmp.put_u64_le(self.last_heartbeat);
27723        __tmp.put_u16_le(self.failed_sessions);
27724        __tmp.put_u16_le(self.successful_sessions);
27725        __tmp.put_u8(self.signal_quality);
27726        __tmp.put_u8(self.ring_pending);
27727        __tmp.put_u8(self.tx_session_pending);
27728        __tmp.put_u8(self.rx_session_pending);
27729        if matches!(version, MavlinkVersion::V2) {
27730            let len = __tmp.len();
27731            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27732        } else {
27733            __tmp.len()
27734        }
27735    }
27736}
27737#[doc = "The RAW IMU readings for the usual 9DOF sensor setup. This message should contain the scaled values to the described units."]
27738#[doc = ""]
27739#[doc = "ID: 26"]
27740#[derive(Debug, Clone, PartialEq)]
27741#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27742#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27743#[cfg_attr(feature = "ts", derive(TS))]
27744#[cfg_attr(feature = "ts", ts(export))]
27745pub struct SCALED_IMU_DATA {
27746    #[doc = "Timestamp (time since system boot)."]
27747    pub time_boot_ms: u32,
27748    #[doc = "X acceleration"]
27749    pub xacc: i16,
27750    #[doc = "Y acceleration"]
27751    pub yacc: i16,
27752    #[doc = "Z acceleration"]
27753    pub zacc: i16,
27754    #[doc = "Angular speed around X axis"]
27755    pub xgyro: i16,
27756    #[doc = "Angular speed around Y axis"]
27757    pub ygyro: i16,
27758    #[doc = "Angular speed around Z axis"]
27759    pub zgyro: i16,
27760    #[doc = "X Magnetic field"]
27761    pub xmag: i16,
27762    #[doc = "Y Magnetic field"]
27763    pub ymag: i16,
27764    #[doc = "Z Magnetic field"]
27765    pub zmag: i16,
27766    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
27767    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27768    pub temperature: i16,
27769}
27770impl SCALED_IMU_DATA {
27771    pub const ENCODED_LEN: usize = 24usize;
27772    pub const DEFAULT: Self = Self {
27773        time_boot_ms: 0_u32,
27774        xacc: 0_i16,
27775        yacc: 0_i16,
27776        zacc: 0_i16,
27777        xgyro: 0_i16,
27778        ygyro: 0_i16,
27779        zgyro: 0_i16,
27780        xmag: 0_i16,
27781        ymag: 0_i16,
27782        zmag: 0_i16,
27783        temperature: 0_i16,
27784    };
27785    #[cfg(feature = "arbitrary")]
27786    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27787        use arbitrary::{Arbitrary, Unstructured};
27788        let mut buf = [0u8; 1024];
27789        rng.fill_bytes(&mut buf);
27790        let mut unstructured = Unstructured::new(&buf);
27791        Self::arbitrary(&mut unstructured).unwrap_or_default()
27792    }
27793}
27794impl Default for SCALED_IMU_DATA {
27795    fn default() -> Self {
27796        Self::DEFAULT.clone()
27797    }
27798}
27799impl MessageData for SCALED_IMU_DATA {
27800    type Message = MavMessage;
27801    const ID: u32 = 26u32;
27802    const NAME: &'static str = "SCALED_IMU";
27803    const EXTRA_CRC: u8 = 170u8;
27804    const ENCODED_LEN: usize = 24usize;
27805    fn deser(
27806        _version: MavlinkVersion,
27807        __input: &[u8],
27808    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27809        let avail_len = __input.len();
27810        let mut payload_buf = [0; Self::ENCODED_LEN];
27811        let mut buf = if avail_len < Self::ENCODED_LEN {
27812            payload_buf[0..avail_len].copy_from_slice(__input);
27813            Bytes::new(&payload_buf)
27814        } else {
27815            Bytes::new(__input)
27816        };
27817        let mut __struct = Self::default();
27818        __struct.time_boot_ms = buf.get_u32_le();
27819        __struct.xacc = buf.get_i16_le();
27820        __struct.yacc = buf.get_i16_le();
27821        __struct.zacc = buf.get_i16_le();
27822        __struct.xgyro = buf.get_i16_le();
27823        __struct.ygyro = buf.get_i16_le();
27824        __struct.zgyro = buf.get_i16_le();
27825        __struct.xmag = buf.get_i16_le();
27826        __struct.ymag = buf.get_i16_le();
27827        __struct.zmag = buf.get_i16_le();
27828        __struct.temperature = buf.get_i16_le();
27829        Ok(__struct)
27830    }
27831    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27832        let mut __tmp = BytesMut::new(bytes);
27833        #[allow(clippy::absurd_extreme_comparisons)]
27834        #[allow(unused_comparisons)]
27835        if __tmp.remaining() < Self::ENCODED_LEN {
27836            panic!(
27837                "buffer is too small (need {} bytes, but got {})",
27838                Self::ENCODED_LEN,
27839                __tmp.remaining(),
27840            )
27841        }
27842        __tmp.put_u32_le(self.time_boot_ms);
27843        __tmp.put_i16_le(self.xacc);
27844        __tmp.put_i16_le(self.yacc);
27845        __tmp.put_i16_le(self.zacc);
27846        __tmp.put_i16_le(self.xgyro);
27847        __tmp.put_i16_le(self.ygyro);
27848        __tmp.put_i16_le(self.zgyro);
27849        __tmp.put_i16_le(self.xmag);
27850        __tmp.put_i16_le(self.ymag);
27851        __tmp.put_i16_le(self.zmag);
27852        if matches!(version, MavlinkVersion::V2) {
27853            __tmp.put_i16_le(self.temperature);
27854            let len = __tmp.len();
27855            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27856        } else {
27857            __tmp.len()
27858        }
27859    }
27860}
27861#[doc = "The RAW IMU readings for secondary 9DOF sensor setup. This message should contain the scaled values to the described units."]
27862#[doc = ""]
27863#[doc = "ID: 116"]
27864#[derive(Debug, Clone, PartialEq)]
27865#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27866#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27867#[cfg_attr(feature = "ts", derive(TS))]
27868#[cfg_attr(feature = "ts", ts(export))]
27869pub struct SCALED_IMU2_DATA {
27870    #[doc = "Timestamp (time since system boot)."]
27871    pub time_boot_ms: u32,
27872    #[doc = "X acceleration"]
27873    pub xacc: i16,
27874    #[doc = "Y acceleration"]
27875    pub yacc: i16,
27876    #[doc = "Z acceleration"]
27877    pub zacc: i16,
27878    #[doc = "Angular speed around X axis"]
27879    pub xgyro: i16,
27880    #[doc = "Angular speed around Y axis"]
27881    pub ygyro: i16,
27882    #[doc = "Angular speed around Z axis"]
27883    pub zgyro: i16,
27884    #[doc = "X Magnetic field"]
27885    pub xmag: i16,
27886    #[doc = "Y Magnetic field"]
27887    pub ymag: i16,
27888    #[doc = "Z Magnetic field"]
27889    pub zmag: i16,
27890    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
27891    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27892    pub temperature: i16,
27893}
27894impl SCALED_IMU2_DATA {
27895    pub const ENCODED_LEN: usize = 24usize;
27896    pub const DEFAULT: Self = Self {
27897        time_boot_ms: 0_u32,
27898        xacc: 0_i16,
27899        yacc: 0_i16,
27900        zacc: 0_i16,
27901        xgyro: 0_i16,
27902        ygyro: 0_i16,
27903        zgyro: 0_i16,
27904        xmag: 0_i16,
27905        ymag: 0_i16,
27906        zmag: 0_i16,
27907        temperature: 0_i16,
27908    };
27909    #[cfg(feature = "arbitrary")]
27910    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27911        use arbitrary::{Arbitrary, Unstructured};
27912        let mut buf = [0u8; 1024];
27913        rng.fill_bytes(&mut buf);
27914        let mut unstructured = Unstructured::new(&buf);
27915        Self::arbitrary(&mut unstructured).unwrap_or_default()
27916    }
27917}
27918impl Default for SCALED_IMU2_DATA {
27919    fn default() -> Self {
27920        Self::DEFAULT.clone()
27921    }
27922}
27923impl MessageData for SCALED_IMU2_DATA {
27924    type Message = MavMessage;
27925    const ID: u32 = 116u32;
27926    const NAME: &'static str = "SCALED_IMU2";
27927    const EXTRA_CRC: u8 = 76u8;
27928    const ENCODED_LEN: usize = 24usize;
27929    fn deser(
27930        _version: MavlinkVersion,
27931        __input: &[u8],
27932    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27933        let avail_len = __input.len();
27934        let mut payload_buf = [0; Self::ENCODED_LEN];
27935        let mut buf = if avail_len < Self::ENCODED_LEN {
27936            payload_buf[0..avail_len].copy_from_slice(__input);
27937            Bytes::new(&payload_buf)
27938        } else {
27939            Bytes::new(__input)
27940        };
27941        let mut __struct = Self::default();
27942        __struct.time_boot_ms = buf.get_u32_le();
27943        __struct.xacc = buf.get_i16_le();
27944        __struct.yacc = buf.get_i16_le();
27945        __struct.zacc = buf.get_i16_le();
27946        __struct.xgyro = buf.get_i16_le();
27947        __struct.ygyro = buf.get_i16_le();
27948        __struct.zgyro = buf.get_i16_le();
27949        __struct.xmag = buf.get_i16_le();
27950        __struct.ymag = buf.get_i16_le();
27951        __struct.zmag = buf.get_i16_le();
27952        __struct.temperature = buf.get_i16_le();
27953        Ok(__struct)
27954    }
27955    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27956        let mut __tmp = BytesMut::new(bytes);
27957        #[allow(clippy::absurd_extreme_comparisons)]
27958        #[allow(unused_comparisons)]
27959        if __tmp.remaining() < Self::ENCODED_LEN {
27960            panic!(
27961                "buffer is too small (need {} bytes, but got {})",
27962                Self::ENCODED_LEN,
27963                __tmp.remaining(),
27964            )
27965        }
27966        __tmp.put_u32_le(self.time_boot_ms);
27967        __tmp.put_i16_le(self.xacc);
27968        __tmp.put_i16_le(self.yacc);
27969        __tmp.put_i16_le(self.zacc);
27970        __tmp.put_i16_le(self.xgyro);
27971        __tmp.put_i16_le(self.ygyro);
27972        __tmp.put_i16_le(self.zgyro);
27973        __tmp.put_i16_le(self.xmag);
27974        __tmp.put_i16_le(self.ymag);
27975        __tmp.put_i16_le(self.zmag);
27976        if matches!(version, MavlinkVersion::V2) {
27977            __tmp.put_i16_le(self.temperature);
27978            let len = __tmp.len();
27979            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27980        } else {
27981            __tmp.len()
27982        }
27983    }
27984}
27985#[doc = "The RAW IMU readings for 3rd 9DOF sensor setup. This message should contain the scaled values to the described units."]
27986#[doc = ""]
27987#[doc = "ID: 129"]
27988#[derive(Debug, Clone, PartialEq)]
27989#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27990#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27991#[cfg_attr(feature = "ts", derive(TS))]
27992#[cfg_attr(feature = "ts", ts(export))]
27993pub struct SCALED_IMU3_DATA {
27994    #[doc = "Timestamp (time since system boot)."]
27995    pub time_boot_ms: u32,
27996    #[doc = "X acceleration"]
27997    pub xacc: i16,
27998    #[doc = "Y acceleration"]
27999    pub yacc: i16,
28000    #[doc = "Z acceleration"]
28001    pub zacc: i16,
28002    #[doc = "Angular speed around X axis"]
28003    pub xgyro: i16,
28004    #[doc = "Angular speed around Y axis"]
28005    pub ygyro: i16,
28006    #[doc = "Angular speed around Z axis"]
28007    pub zgyro: i16,
28008    #[doc = "X Magnetic field"]
28009    pub xmag: i16,
28010    #[doc = "Y Magnetic field"]
28011    pub ymag: i16,
28012    #[doc = "Z Magnetic field"]
28013    pub zmag: i16,
28014    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
28015    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28016    pub temperature: i16,
28017}
28018impl SCALED_IMU3_DATA {
28019    pub const ENCODED_LEN: usize = 24usize;
28020    pub const DEFAULT: Self = Self {
28021        time_boot_ms: 0_u32,
28022        xacc: 0_i16,
28023        yacc: 0_i16,
28024        zacc: 0_i16,
28025        xgyro: 0_i16,
28026        ygyro: 0_i16,
28027        zgyro: 0_i16,
28028        xmag: 0_i16,
28029        ymag: 0_i16,
28030        zmag: 0_i16,
28031        temperature: 0_i16,
28032    };
28033    #[cfg(feature = "arbitrary")]
28034    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28035        use arbitrary::{Arbitrary, Unstructured};
28036        let mut buf = [0u8; 1024];
28037        rng.fill_bytes(&mut buf);
28038        let mut unstructured = Unstructured::new(&buf);
28039        Self::arbitrary(&mut unstructured).unwrap_or_default()
28040    }
28041}
28042impl Default for SCALED_IMU3_DATA {
28043    fn default() -> Self {
28044        Self::DEFAULT.clone()
28045    }
28046}
28047impl MessageData for SCALED_IMU3_DATA {
28048    type Message = MavMessage;
28049    const ID: u32 = 129u32;
28050    const NAME: &'static str = "SCALED_IMU3";
28051    const EXTRA_CRC: u8 = 46u8;
28052    const ENCODED_LEN: usize = 24usize;
28053    fn deser(
28054        _version: MavlinkVersion,
28055        __input: &[u8],
28056    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28057        let avail_len = __input.len();
28058        let mut payload_buf = [0; Self::ENCODED_LEN];
28059        let mut buf = if avail_len < Self::ENCODED_LEN {
28060            payload_buf[0..avail_len].copy_from_slice(__input);
28061            Bytes::new(&payload_buf)
28062        } else {
28063            Bytes::new(__input)
28064        };
28065        let mut __struct = Self::default();
28066        __struct.time_boot_ms = buf.get_u32_le();
28067        __struct.xacc = buf.get_i16_le();
28068        __struct.yacc = buf.get_i16_le();
28069        __struct.zacc = buf.get_i16_le();
28070        __struct.xgyro = buf.get_i16_le();
28071        __struct.ygyro = buf.get_i16_le();
28072        __struct.zgyro = buf.get_i16_le();
28073        __struct.xmag = buf.get_i16_le();
28074        __struct.ymag = buf.get_i16_le();
28075        __struct.zmag = buf.get_i16_le();
28076        __struct.temperature = buf.get_i16_le();
28077        Ok(__struct)
28078    }
28079    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28080        let mut __tmp = BytesMut::new(bytes);
28081        #[allow(clippy::absurd_extreme_comparisons)]
28082        #[allow(unused_comparisons)]
28083        if __tmp.remaining() < Self::ENCODED_LEN {
28084            panic!(
28085                "buffer is too small (need {} bytes, but got {})",
28086                Self::ENCODED_LEN,
28087                __tmp.remaining(),
28088            )
28089        }
28090        __tmp.put_u32_le(self.time_boot_ms);
28091        __tmp.put_i16_le(self.xacc);
28092        __tmp.put_i16_le(self.yacc);
28093        __tmp.put_i16_le(self.zacc);
28094        __tmp.put_i16_le(self.xgyro);
28095        __tmp.put_i16_le(self.ygyro);
28096        __tmp.put_i16_le(self.zgyro);
28097        __tmp.put_i16_le(self.xmag);
28098        __tmp.put_i16_le(self.ymag);
28099        __tmp.put_i16_le(self.zmag);
28100        if matches!(version, MavlinkVersion::V2) {
28101            __tmp.put_i16_le(self.temperature);
28102            let len = __tmp.len();
28103            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28104        } else {
28105            __tmp.len()
28106        }
28107    }
28108}
28109#[doc = "The pressure readings for the typical setup of one absolute and differential pressure sensor. The units are as specified in each field."]
28110#[doc = ""]
28111#[doc = "ID: 29"]
28112#[derive(Debug, Clone, PartialEq)]
28113#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28114#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28115#[cfg_attr(feature = "ts", derive(TS))]
28116#[cfg_attr(feature = "ts", ts(export))]
28117pub struct SCALED_PRESSURE_DATA {
28118    #[doc = "Timestamp (time since system boot)."]
28119    pub time_boot_ms: u32,
28120    #[doc = "Absolute pressure"]
28121    pub press_abs: f32,
28122    #[doc = "Differential pressure 1"]
28123    pub press_diff: f32,
28124    #[doc = "Absolute pressure temperature"]
28125    pub temperature: i16,
28126    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
28127    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28128    pub temperature_press_diff: i16,
28129}
28130impl SCALED_PRESSURE_DATA {
28131    pub const ENCODED_LEN: usize = 16usize;
28132    pub const DEFAULT: Self = Self {
28133        time_boot_ms: 0_u32,
28134        press_abs: 0.0_f32,
28135        press_diff: 0.0_f32,
28136        temperature: 0_i16,
28137        temperature_press_diff: 0_i16,
28138    };
28139    #[cfg(feature = "arbitrary")]
28140    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28141        use arbitrary::{Arbitrary, Unstructured};
28142        let mut buf = [0u8; 1024];
28143        rng.fill_bytes(&mut buf);
28144        let mut unstructured = Unstructured::new(&buf);
28145        Self::arbitrary(&mut unstructured).unwrap_or_default()
28146    }
28147}
28148impl Default for SCALED_PRESSURE_DATA {
28149    fn default() -> Self {
28150        Self::DEFAULT.clone()
28151    }
28152}
28153impl MessageData for SCALED_PRESSURE_DATA {
28154    type Message = MavMessage;
28155    const ID: u32 = 29u32;
28156    const NAME: &'static str = "SCALED_PRESSURE";
28157    const EXTRA_CRC: u8 = 115u8;
28158    const ENCODED_LEN: usize = 16usize;
28159    fn deser(
28160        _version: MavlinkVersion,
28161        __input: &[u8],
28162    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28163        let avail_len = __input.len();
28164        let mut payload_buf = [0; Self::ENCODED_LEN];
28165        let mut buf = if avail_len < Self::ENCODED_LEN {
28166            payload_buf[0..avail_len].copy_from_slice(__input);
28167            Bytes::new(&payload_buf)
28168        } else {
28169            Bytes::new(__input)
28170        };
28171        let mut __struct = Self::default();
28172        __struct.time_boot_ms = buf.get_u32_le();
28173        __struct.press_abs = buf.get_f32_le();
28174        __struct.press_diff = buf.get_f32_le();
28175        __struct.temperature = buf.get_i16_le();
28176        __struct.temperature_press_diff = buf.get_i16_le();
28177        Ok(__struct)
28178    }
28179    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28180        let mut __tmp = BytesMut::new(bytes);
28181        #[allow(clippy::absurd_extreme_comparisons)]
28182        #[allow(unused_comparisons)]
28183        if __tmp.remaining() < Self::ENCODED_LEN {
28184            panic!(
28185                "buffer is too small (need {} bytes, but got {})",
28186                Self::ENCODED_LEN,
28187                __tmp.remaining(),
28188            )
28189        }
28190        __tmp.put_u32_le(self.time_boot_ms);
28191        __tmp.put_f32_le(self.press_abs);
28192        __tmp.put_f32_le(self.press_diff);
28193        __tmp.put_i16_le(self.temperature);
28194        if matches!(version, MavlinkVersion::V2) {
28195            __tmp.put_i16_le(self.temperature_press_diff);
28196            let len = __tmp.len();
28197            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28198        } else {
28199            __tmp.len()
28200        }
28201    }
28202}
28203#[doc = "Barometer readings for 2nd barometer."]
28204#[doc = ""]
28205#[doc = "ID: 137"]
28206#[derive(Debug, Clone, PartialEq)]
28207#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28208#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28209#[cfg_attr(feature = "ts", derive(TS))]
28210#[cfg_attr(feature = "ts", ts(export))]
28211pub struct SCALED_PRESSURE2_DATA {
28212    #[doc = "Timestamp (time since system boot)."]
28213    pub time_boot_ms: u32,
28214    #[doc = "Absolute pressure"]
28215    pub press_abs: f32,
28216    #[doc = "Differential pressure"]
28217    pub press_diff: f32,
28218    #[doc = "Absolute pressure temperature"]
28219    pub temperature: i16,
28220    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
28221    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28222    pub temperature_press_diff: i16,
28223}
28224impl SCALED_PRESSURE2_DATA {
28225    pub const ENCODED_LEN: usize = 16usize;
28226    pub const DEFAULT: Self = Self {
28227        time_boot_ms: 0_u32,
28228        press_abs: 0.0_f32,
28229        press_diff: 0.0_f32,
28230        temperature: 0_i16,
28231        temperature_press_diff: 0_i16,
28232    };
28233    #[cfg(feature = "arbitrary")]
28234    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28235        use arbitrary::{Arbitrary, Unstructured};
28236        let mut buf = [0u8; 1024];
28237        rng.fill_bytes(&mut buf);
28238        let mut unstructured = Unstructured::new(&buf);
28239        Self::arbitrary(&mut unstructured).unwrap_or_default()
28240    }
28241}
28242impl Default for SCALED_PRESSURE2_DATA {
28243    fn default() -> Self {
28244        Self::DEFAULT.clone()
28245    }
28246}
28247impl MessageData for SCALED_PRESSURE2_DATA {
28248    type Message = MavMessage;
28249    const ID: u32 = 137u32;
28250    const NAME: &'static str = "SCALED_PRESSURE2";
28251    const EXTRA_CRC: u8 = 195u8;
28252    const ENCODED_LEN: usize = 16usize;
28253    fn deser(
28254        _version: MavlinkVersion,
28255        __input: &[u8],
28256    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28257        let avail_len = __input.len();
28258        let mut payload_buf = [0; Self::ENCODED_LEN];
28259        let mut buf = if avail_len < Self::ENCODED_LEN {
28260            payload_buf[0..avail_len].copy_from_slice(__input);
28261            Bytes::new(&payload_buf)
28262        } else {
28263            Bytes::new(__input)
28264        };
28265        let mut __struct = Self::default();
28266        __struct.time_boot_ms = buf.get_u32_le();
28267        __struct.press_abs = buf.get_f32_le();
28268        __struct.press_diff = buf.get_f32_le();
28269        __struct.temperature = buf.get_i16_le();
28270        __struct.temperature_press_diff = buf.get_i16_le();
28271        Ok(__struct)
28272    }
28273    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28274        let mut __tmp = BytesMut::new(bytes);
28275        #[allow(clippy::absurd_extreme_comparisons)]
28276        #[allow(unused_comparisons)]
28277        if __tmp.remaining() < Self::ENCODED_LEN {
28278            panic!(
28279                "buffer is too small (need {} bytes, but got {})",
28280                Self::ENCODED_LEN,
28281                __tmp.remaining(),
28282            )
28283        }
28284        __tmp.put_u32_le(self.time_boot_ms);
28285        __tmp.put_f32_le(self.press_abs);
28286        __tmp.put_f32_le(self.press_diff);
28287        __tmp.put_i16_le(self.temperature);
28288        if matches!(version, MavlinkVersion::V2) {
28289            __tmp.put_i16_le(self.temperature_press_diff);
28290            let len = __tmp.len();
28291            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28292        } else {
28293            __tmp.len()
28294        }
28295    }
28296}
28297#[doc = "Barometer readings for 3rd barometer."]
28298#[doc = ""]
28299#[doc = "ID: 143"]
28300#[derive(Debug, Clone, PartialEq)]
28301#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28302#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28303#[cfg_attr(feature = "ts", derive(TS))]
28304#[cfg_attr(feature = "ts", ts(export))]
28305pub struct SCALED_PRESSURE3_DATA {
28306    #[doc = "Timestamp (time since system boot)."]
28307    pub time_boot_ms: u32,
28308    #[doc = "Absolute pressure"]
28309    pub press_abs: f32,
28310    #[doc = "Differential pressure"]
28311    pub press_diff: f32,
28312    #[doc = "Absolute pressure temperature"]
28313    pub temperature: i16,
28314    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
28315    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28316    pub temperature_press_diff: i16,
28317}
28318impl SCALED_PRESSURE3_DATA {
28319    pub const ENCODED_LEN: usize = 16usize;
28320    pub const DEFAULT: Self = Self {
28321        time_boot_ms: 0_u32,
28322        press_abs: 0.0_f32,
28323        press_diff: 0.0_f32,
28324        temperature: 0_i16,
28325        temperature_press_diff: 0_i16,
28326    };
28327    #[cfg(feature = "arbitrary")]
28328    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28329        use arbitrary::{Arbitrary, Unstructured};
28330        let mut buf = [0u8; 1024];
28331        rng.fill_bytes(&mut buf);
28332        let mut unstructured = Unstructured::new(&buf);
28333        Self::arbitrary(&mut unstructured).unwrap_or_default()
28334    }
28335}
28336impl Default for SCALED_PRESSURE3_DATA {
28337    fn default() -> Self {
28338        Self::DEFAULT.clone()
28339    }
28340}
28341impl MessageData for SCALED_PRESSURE3_DATA {
28342    type Message = MavMessage;
28343    const ID: u32 = 143u32;
28344    const NAME: &'static str = "SCALED_PRESSURE3";
28345    const EXTRA_CRC: u8 = 131u8;
28346    const ENCODED_LEN: usize = 16usize;
28347    fn deser(
28348        _version: MavlinkVersion,
28349        __input: &[u8],
28350    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28351        let avail_len = __input.len();
28352        let mut payload_buf = [0; Self::ENCODED_LEN];
28353        let mut buf = if avail_len < Self::ENCODED_LEN {
28354            payload_buf[0..avail_len].copy_from_slice(__input);
28355            Bytes::new(&payload_buf)
28356        } else {
28357            Bytes::new(__input)
28358        };
28359        let mut __struct = Self::default();
28360        __struct.time_boot_ms = buf.get_u32_le();
28361        __struct.press_abs = buf.get_f32_le();
28362        __struct.press_diff = buf.get_f32_le();
28363        __struct.temperature = buf.get_i16_le();
28364        __struct.temperature_press_diff = buf.get_i16_le();
28365        Ok(__struct)
28366    }
28367    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28368        let mut __tmp = BytesMut::new(bytes);
28369        #[allow(clippy::absurd_extreme_comparisons)]
28370        #[allow(unused_comparisons)]
28371        if __tmp.remaining() < Self::ENCODED_LEN {
28372            panic!(
28373                "buffer is too small (need {} bytes, but got {})",
28374                Self::ENCODED_LEN,
28375                __tmp.remaining(),
28376            )
28377        }
28378        __tmp.put_u32_le(self.time_boot_ms);
28379        __tmp.put_f32_le(self.press_abs);
28380        __tmp.put_f32_le(self.press_diff);
28381        __tmp.put_i16_le(self.temperature);
28382        if matches!(version, MavlinkVersion::V2) {
28383            __tmp.put_i16_le(self.temperature_press_diff);
28384            let len = __tmp.len();
28385            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28386        } else {
28387            __tmp.len()
28388        }
28389    }
28390}
28391#[doc = "Monitoring of sensorpod status."]
28392#[doc = ""]
28393#[doc = "ID: 8012"]
28394#[derive(Debug, Clone, PartialEq)]
28395#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28396#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28397#[cfg_attr(feature = "ts", derive(TS))]
28398#[cfg_attr(feature = "ts", ts(export))]
28399pub struct SENSORPOD_STATUS_DATA {
28400    #[doc = "Timestamp in linuxtime (since 1.1.1970)"]
28401    pub timestamp: u64,
28402    #[doc = "Free space available in recordings directory in [Gb] * 1e2"]
28403    pub free_space: u16,
28404    #[doc = "Rate of ROS topic 1"]
28405    pub visensor_rate_1: u8,
28406    #[doc = "Rate of ROS topic 2"]
28407    pub visensor_rate_2: u8,
28408    #[doc = "Rate of ROS topic 3"]
28409    pub visensor_rate_3: u8,
28410    #[doc = "Rate of ROS topic 4"]
28411    pub visensor_rate_4: u8,
28412    #[doc = "Number of recording nodes"]
28413    pub recording_nodes_count: u8,
28414    #[doc = "Temperature of sensorpod CPU in"]
28415    pub cpu_temp: u8,
28416}
28417impl SENSORPOD_STATUS_DATA {
28418    pub const ENCODED_LEN: usize = 16usize;
28419    pub const DEFAULT: Self = Self {
28420        timestamp: 0_u64,
28421        free_space: 0_u16,
28422        visensor_rate_1: 0_u8,
28423        visensor_rate_2: 0_u8,
28424        visensor_rate_3: 0_u8,
28425        visensor_rate_4: 0_u8,
28426        recording_nodes_count: 0_u8,
28427        cpu_temp: 0_u8,
28428    };
28429    #[cfg(feature = "arbitrary")]
28430    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28431        use arbitrary::{Arbitrary, Unstructured};
28432        let mut buf = [0u8; 1024];
28433        rng.fill_bytes(&mut buf);
28434        let mut unstructured = Unstructured::new(&buf);
28435        Self::arbitrary(&mut unstructured).unwrap_or_default()
28436    }
28437}
28438impl Default for SENSORPOD_STATUS_DATA {
28439    fn default() -> Self {
28440        Self::DEFAULT.clone()
28441    }
28442}
28443impl MessageData for SENSORPOD_STATUS_DATA {
28444    type Message = MavMessage;
28445    const ID: u32 = 8012u32;
28446    const NAME: &'static str = "SENSORPOD_STATUS";
28447    const EXTRA_CRC: u8 = 54u8;
28448    const ENCODED_LEN: usize = 16usize;
28449    fn deser(
28450        _version: MavlinkVersion,
28451        __input: &[u8],
28452    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28453        let avail_len = __input.len();
28454        let mut payload_buf = [0; Self::ENCODED_LEN];
28455        let mut buf = if avail_len < Self::ENCODED_LEN {
28456            payload_buf[0..avail_len].copy_from_slice(__input);
28457            Bytes::new(&payload_buf)
28458        } else {
28459            Bytes::new(__input)
28460        };
28461        let mut __struct = Self::default();
28462        __struct.timestamp = buf.get_u64_le();
28463        __struct.free_space = buf.get_u16_le();
28464        __struct.visensor_rate_1 = buf.get_u8();
28465        __struct.visensor_rate_2 = buf.get_u8();
28466        __struct.visensor_rate_3 = buf.get_u8();
28467        __struct.visensor_rate_4 = buf.get_u8();
28468        __struct.recording_nodes_count = buf.get_u8();
28469        __struct.cpu_temp = buf.get_u8();
28470        Ok(__struct)
28471    }
28472    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28473        let mut __tmp = BytesMut::new(bytes);
28474        #[allow(clippy::absurd_extreme_comparisons)]
28475        #[allow(unused_comparisons)]
28476        if __tmp.remaining() < Self::ENCODED_LEN {
28477            panic!(
28478                "buffer is too small (need {} bytes, but got {})",
28479                Self::ENCODED_LEN,
28480                __tmp.remaining(),
28481            )
28482        }
28483        __tmp.put_u64_le(self.timestamp);
28484        __tmp.put_u16_le(self.free_space);
28485        __tmp.put_u8(self.visensor_rate_1);
28486        __tmp.put_u8(self.visensor_rate_2);
28487        __tmp.put_u8(self.visensor_rate_3);
28488        __tmp.put_u8(self.visensor_rate_4);
28489        __tmp.put_u8(self.recording_nodes_count);
28490        __tmp.put_u8(self.cpu_temp);
28491        if matches!(version, MavlinkVersion::V2) {
28492            let len = __tmp.len();
28493            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28494        } else {
28495            __tmp.len()
28496        }
28497    }
28498}
28499#[doc = "Calibrated airflow angle measurements."]
28500#[doc = ""]
28501#[doc = "ID: 8016"]
28502#[derive(Debug, Clone, PartialEq)]
28503#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28504#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28505#[cfg_attr(feature = "ts", derive(TS))]
28506#[cfg_attr(feature = "ts", ts(export))]
28507pub struct SENSOR_AIRFLOW_ANGLES_DATA {
28508    #[doc = "Timestamp"]
28509    pub timestamp: u64,
28510    #[doc = "Angle of attack"]
28511    pub angleofattack: f32,
28512    #[doc = "Sideslip angle"]
28513    pub sideslip: f32,
28514    #[doc = "Angle of attack measurement valid"]
28515    pub angleofattack_valid: u8,
28516    #[doc = "Sideslip angle measurement valid"]
28517    pub sideslip_valid: u8,
28518}
28519impl SENSOR_AIRFLOW_ANGLES_DATA {
28520    pub const ENCODED_LEN: usize = 18usize;
28521    pub const DEFAULT: Self = Self {
28522        timestamp: 0_u64,
28523        angleofattack: 0.0_f32,
28524        sideslip: 0.0_f32,
28525        angleofattack_valid: 0_u8,
28526        sideslip_valid: 0_u8,
28527    };
28528    #[cfg(feature = "arbitrary")]
28529    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28530        use arbitrary::{Arbitrary, Unstructured};
28531        let mut buf = [0u8; 1024];
28532        rng.fill_bytes(&mut buf);
28533        let mut unstructured = Unstructured::new(&buf);
28534        Self::arbitrary(&mut unstructured).unwrap_or_default()
28535    }
28536}
28537impl Default for SENSOR_AIRFLOW_ANGLES_DATA {
28538    fn default() -> Self {
28539        Self::DEFAULT.clone()
28540    }
28541}
28542impl MessageData for SENSOR_AIRFLOW_ANGLES_DATA {
28543    type Message = MavMessage;
28544    const ID: u32 = 8016u32;
28545    const NAME: &'static str = "SENSOR_AIRFLOW_ANGLES";
28546    const EXTRA_CRC: u8 = 149u8;
28547    const ENCODED_LEN: usize = 18usize;
28548    fn deser(
28549        _version: MavlinkVersion,
28550        __input: &[u8],
28551    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28552        let avail_len = __input.len();
28553        let mut payload_buf = [0; Self::ENCODED_LEN];
28554        let mut buf = if avail_len < Self::ENCODED_LEN {
28555            payload_buf[0..avail_len].copy_from_slice(__input);
28556            Bytes::new(&payload_buf)
28557        } else {
28558            Bytes::new(__input)
28559        };
28560        let mut __struct = Self::default();
28561        __struct.timestamp = buf.get_u64_le();
28562        __struct.angleofattack = buf.get_f32_le();
28563        __struct.sideslip = buf.get_f32_le();
28564        __struct.angleofattack_valid = buf.get_u8();
28565        __struct.sideslip_valid = buf.get_u8();
28566        Ok(__struct)
28567    }
28568    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28569        let mut __tmp = BytesMut::new(bytes);
28570        #[allow(clippy::absurd_extreme_comparisons)]
28571        #[allow(unused_comparisons)]
28572        if __tmp.remaining() < Self::ENCODED_LEN {
28573            panic!(
28574                "buffer is too small (need {} bytes, but got {})",
28575                Self::ENCODED_LEN,
28576                __tmp.remaining(),
28577            )
28578        }
28579        __tmp.put_u64_le(self.timestamp);
28580        __tmp.put_f32_le(self.angleofattack);
28581        __tmp.put_f32_le(self.sideslip);
28582        __tmp.put_u8(self.angleofattack_valid);
28583        __tmp.put_u8(self.sideslip_valid);
28584        if matches!(version, MavlinkVersion::V2) {
28585            let len = __tmp.len();
28586            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28587        } else {
28588            __tmp.len()
28589        }
28590    }
28591}
28592#[doc = "Atmospheric sensors (temperature, humidity, ...)."]
28593#[doc = ""]
28594#[doc = "ID: 8009"]
28595#[derive(Debug, Clone, PartialEq)]
28596#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28597#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28598#[cfg_attr(feature = "ts", derive(TS))]
28599#[cfg_attr(feature = "ts", ts(export))]
28600pub struct SENS_ATMOS_DATA {
28601    #[doc = "Time since system boot"]
28602    pub timestamp: u64,
28603    #[doc = "Ambient temperature"]
28604    pub TempAmbient: f32,
28605    #[doc = "Relative humidity"]
28606    pub Humidity: f32,
28607}
28608impl SENS_ATMOS_DATA {
28609    pub const ENCODED_LEN: usize = 16usize;
28610    pub const DEFAULT: Self = Self {
28611        timestamp: 0_u64,
28612        TempAmbient: 0.0_f32,
28613        Humidity: 0.0_f32,
28614    };
28615    #[cfg(feature = "arbitrary")]
28616    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28617        use arbitrary::{Arbitrary, Unstructured};
28618        let mut buf = [0u8; 1024];
28619        rng.fill_bytes(&mut buf);
28620        let mut unstructured = Unstructured::new(&buf);
28621        Self::arbitrary(&mut unstructured).unwrap_or_default()
28622    }
28623}
28624impl Default for SENS_ATMOS_DATA {
28625    fn default() -> Self {
28626        Self::DEFAULT.clone()
28627    }
28628}
28629impl MessageData for SENS_ATMOS_DATA {
28630    type Message = MavMessage;
28631    const ID: u32 = 8009u32;
28632    const NAME: &'static str = "SENS_ATMOS";
28633    const EXTRA_CRC: u8 = 144u8;
28634    const ENCODED_LEN: usize = 16usize;
28635    fn deser(
28636        _version: MavlinkVersion,
28637        __input: &[u8],
28638    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28639        let avail_len = __input.len();
28640        let mut payload_buf = [0; Self::ENCODED_LEN];
28641        let mut buf = if avail_len < Self::ENCODED_LEN {
28642            payload_buf[0..avail_len].copy_from_slice(__input);
28643            Bytes::new(&payload_buf)
28644        } else {
28645            Bytes::new(__input)
28646        };
28647        let mut __struct = Self::default();
28648        __struct.timestamp = buf.get_u64_le();
28649        __struct.TempAmbient = buf.get_f32_le();
28650        __struct.Humidity = buf.get_f32_le();
28651        Ok(__struct)
28652    }
28653    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28654        let mut __tmp = BytesMut::new(bytes);
28655        #[allow(clippy::absurd_extreme_comparisons)]
28656        #[allow(unused_comparisons)]
28657        if __tmp.remaining() < Self::ENCODED_LEN {
28658            panic!(
28659                "buffer is too small (need {} bytes, but got {})",
28660                Self::ENCODED_LEN,
28661                __tmp.remaining(),
28662            )
28663        }
28664        __tmp.put_u64_le(self.timestamp);
28665        __tmp.put_f32_le(self.TempAmbient);
28666        __tmp.put_f32_le(self.Humidity);
28667        if matches!(version, MavlinkVersion::V2) {
28668            let len = __tmp.len();
28669            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28670        } else {
28671            __tmp.len()
28672        }
28673    }
28674}
28675#[doc = "Battery pack monitoring data for Li-Ion batteries."]
28676#[doc = ""]
28677#[doc = "ID: 8010"]
28678#[derive(Debug, Clone, PartialEq)]
28679#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28680#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28681#[cfg_attr(feature = "ts", derive(TS))]
28682#[cfg_attr(feature = "ts", ts(export))]
28683pub struct SENS_BATMON_DATA {
28684    #[doc = "Time since system start"]
28685    pub batmon_timestamp: u64,
28686    #[doc = "Battery pack temperature"]
28687    pub temperature: f32,
28688    #[doc = "Battery monitor safetystatus report bits in Hex"]
28689    pub safetystatus: u32,
28690    #[doc = "Battery monitor operation status report bits in Hex"]
28691    pub operationstatus: u32,
28692    #[doc = "Battery pack voltage"]
28693    pub voltage: u16,
28694    #[doc = "Battery pack current"]
28695    pub current: i16,
28696    #[doc = "Battery monitor status report bits in Hex"]
28697    pub batterystatus: u16,
28698    #[doc = "Battery monitor serial number in Hex"]
28699    pub serialnumber: u16,
28700    #[doc = "Battery pack cell 1 voltage"]
28701    pub cellvoltage1: u16,
28702    #[doc = "Battery pack cell 2 voltage"]
28703    pub cellvoltage2: u16,
28704    #[doc = "Battery pack cell 3 voltage"]
28705    pub cellvoltage3: u16,
28706    #[doc = "Battery pack cell 4 voltage"]
28707    pub cellvoltage4: u16,
28708    #[doc = "Battery pack cell 5 voltage"]
28709    pub cellvoltage5: u16,
28710    #[doc = "Battery pack cell 6 voltage"]
28711    pub cellvoltage6: u16,
28712    #[doc = "Battery pack state-of-charge"]
28713    pub SoC: u8,
28714}
28715impl SENS_BATMON_DATA {
28716    pub const ENCODED_LEN: usize = 41usize;
28717    pub const DEFAULT: Self = Self {
28718        batmon_timestamp: 0_u64,
28719        temperature: 0.0_f32,
28720        safetystatus: 0_u32,
28721        operationstatus: 0_u32,
28722        voltage: 0_u16,
28723        current: 0_i16,
28724        batterystatus: 0_u16,
28725        serialnumber: 0_u16,
28726        cellvoltage1: 0_u16,
28727        cellvoltage2: 0_u16,
28728        cellvoltage3: 0_u16,
28729        cellvoltage4: 0_u16,
28730        cellvoltage5: 0_u16,
28731        cellvoltage6: 0_u16,
28732        SoC: 0_u8,
28733    };
28734    #[cfg(feature = "arbitrary")]
28735    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28736        use arbitrary::{Arbitrary, Unstructured};
28737        let mut buf = [0u8; 1024];
28738        rng.fill_bytes(&mut buf);
28739        let mut unstructured = Unstructured::new(&buf);
28740        Self::arbitrary(&mut unstructured).unwrap_or_default()
28741    }
28742}
28743impl Default for SENS_BATMON_DATA {
28744    fn default() -> Self {
28745        Self::DEFAULT.clone()
28746    }
28747}
28748impl MessageData for SENS_BATMON_DATA {
28749    type Message = MavMessage;
28750    const ID: u32 = 8010u32;
28751    const NAME: &'static str = "SENS_BATMON";
28752    const EXTRA_CRC: u8 = 155u8;
28753    const ENCODED_LEN: usize = 41usize;
28754    fn deser(
28755        _version: MavlinkVersion,
28756        __input: &[u8],
28757    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28758        let avail_len = __input.len();
28759        let mut payload_buf = [0; Self::ENCODED_LEN];
28760        let mut buf = if avail_len < Self::ENCODED_LEN {
28761            payload_buf[0..avail_len].copy_from_slice(__input);
28762            Bytes::new(&payload_buf)
28763        } else {
28764            Bytes::new(__input)
28765        };
28766        let mut __struct = Self::default();
28767        __struct.batmon_timestamp = buf.get_u64_le();
28768        __struct.temperature = buf.get_f32_le();
28769        __struct.safetystatus = buf.get_u32_le();
28770        __struct.operationstatus = buf.get_u32_le();
28771        __struct.voltage = buf.get_u16_le();
28772        __struct.current = buf.get_i16_le();
28773        __struct.batterystatus = buf.get_u16_le();
28774        __struct.serialnumber = buf.get_u16_le();
28775        __struct.cellvoltage1 = buf.get_u16_le();
28776        __struct.cellvoltage2 = buf.get_u16_le();
28777        __struct.cellvoltage3 = buf.get_u16_le();
28778        __struct.cellvoltage4 = buf.get_u16_le();
28779        __struct.cellvoltage5 = buf.get_u16_le();
28780        __struct.cellvoltage6 = buf.get_u16_le();
28781        __struct.SoC = buf.get_u8();
28782        Ok(__struct)
28783    }
28784    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28785        let mut __tmp = BytesMut::new(bytes);
28786        #[allow(clippy::absurd_extreme_comparisons)]
28787        #[allow(unused_comparisons)]
28788        if __tmp.remaining() < Self::ENCODED_LEN {
28789            panic!(
28790                "buffer is too small (need {} bytes, but got {})",
28791                Self::ENCODED_LEN,
28792                __tmp.remaining(),
28793            )
28794        }
28795        __tmp.put_u64_le(self.batmon_timestamp);
28796        __tmp.put_f32_le(self.temperature);
28797        __tmp.put_u32_le(self.safetystatus);
28798        __tmp.put_u32_le(self.operationstatus);
28799        __tmp.put_u16_le(self.voltage);
28800        __tmp.put_i16_le(self.current);
28801        __tmp.put_u16_le(self.batterystatus);
28802        __tmp.put_u16_le(self.serialnumber);
28803        __tmp.put_u16_le(self.cellvoltage1);
28804        __tmp.put_u16_le(self.cellvoltage2);
28805        __tmp.put_u16_le(self.cellvoltage3);
28806        __tmp.put_u16_le(self.cellvoltage4);
28807        __tmp.put_u16_le(self.cellvoltage5);
28808        __tmp.put_u16_le(self.cellvoltage6);
28809        __tmp.put_u8(self.SoC);
28810        if matches!(version, MavlinkVersion::V2) {
28811            let len = __tmp.len();
28812            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28813        } else {
28814            __tmp.len()
28815        }
28816    }
28817}
28818#[doc = "Maximum Power Point Tracker (MPPT) sensor data for solar module power performance tracking."]
28819#[doc = ""]
28820#[doc = "ID: 8003"]
28821#[derive(Debug, Clone, PartialEq)]
28822#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28823#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28824#[cfg_attr(feature = "ts", derive(TS))]
28825#[cfg_attr(feature = "ts", ts(export))]
28826pub struct SENS_MPPT_DATA {
28827    #[doc = "MPPT last timestamp"]
28828    pub mppt_timestamp: u64,
28829    #[doc = "MPPT1 voltage"]
28830    pub mppt1_volt: f32,
28831    #[doc = "MPPT1 current"]
28832    pub mppt1_amp: f32,
28833    #[doc = "MPPT2 voltage"]
28834    pub mppt2_volt: f32,
28835    #[doc = "MPPT2 current"]
28836    pub mppt2_amp: f32,
28837    #[doc = "MPPT3 voltage"]
28838    pub mppt3_volt: f32,
28839    #[doc = "MPPT3 current"]
28840    pub mppt3_amp: f32,
28841    #[doc = "MPPT1 pwm"]
28842    pub mppt1_pwm: u16,
28843    #[doc = "MPPT2 pwm"]
28844    pub mppt2_pwm: u16,
28845    #[doc = "MPPT3 pwm"]
28846    pub mppt3_pwm: u16,
28847    #[doc = "MPPT1 status"]
28848    pub mppt1_status: u8,
28849    #[doc = "MPPT2 status"]
28850    pub mppt2_status: u8,
28851    #[doc = "MPPT3 status"]
28852    pub mppt3_status: u8,
28853}
28854impl SENS_MPPT_DATA {
28855    pub const ENCODED_LEN: usize = 41usize;
28856    pub const DEFAULT: Self = Self {
28857        mppt_timestamp: 0_u64,
28858        mppt1_volt: 0.0_f32,
28859        mppt1_amp: 0.0_f32,
28860        mppt2_volt: 0.0_f32,
28861        mppt2_amp: 0.0_f32,
28862        mppt3_volt: 0.0_f32,
28863        mppt3_amp: 0.0_f32,
28864        mppt1_pwm: 0_u16,
28865        mppt2_pwm: 0_u16,
28866        mppt3_pwm: 0_u16,
28867        mppt1_status: 0_u8,
28868        mppt2_status: 0_u8,
28869        mppt3_status: 0_u8,
28870    };
28871    #[cfg(feature = "arbitrary")]
28872    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28873        use arbitrary::{Arbitrary, Unstructured};
28874        let mut buf = [0u8; 1024];
28875        rng.fill_bytes(&mut buf);
28876        let mut unstructured = Unstructured::new(&buf);
28877        Self::arbitrary(&mut unstructured).unwrap_or_default()
28878    }
28879}
28880impl Default for SENS_MPPT_DATA {
28881    fn default() -> Self {
28882        Self::DEFAULT.clone()
28883    }
28884}
28885impl MessageData for SENS_MPPT_DATA {
28886    type Message = MavMessage;
28887    const ID: u32 = 8003u32;
28888    const NAME: &'static str = "SENS_MPPT";
28889    const EXTRA_CRC: u8 = 231u8;
28890    const ENCODED_LEN: usize = 41usize;
28891    fn deser(
28892        _version: MavlinkVersion,
28893        __input: &[u8],
28894    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28895        let avail_len = __input.len();
28896        let mut payload_buf = [0; Self::ENCODED_LEN];
28897        let mut buf = if avail_len < Self::ENCODED_LEN {
28898            payload_buf[0..avail_len].copy_from_slice(__input);
28899            Bytes::new(&payload_buf)
28900        } else {
28901            Bytes::new(__input)
28902        };
28903        let mut __struct = Self::default();
28904        __struct.mppt_timestamp = buf.get_u64_le();
28905        __struct.mppt1_volt = buf.get_f32_le();
28906        __struct.mppt1_amp = buf.get_f32_le();
28907        __struct.mppt2_volt = buf.get_f32_le();
28908        __struct.mppt2_amp = buf.get_f32_le();
28909        __struct.mppt3_volt = buf.get_f32_le();
28910        __struct.mppt3_amp = buf.get_f32_le();
28911        __struct.mppt1_pwm = buf.get_u16_le();
28912        __struct.mppt2_pwm = buf.get_u16_le();
28913        __struct.mppt3_pwm = buf.get_u16_le();
28914        __struct.mppt1_status = buf.get_u8();
28915        __struct.mppt2_status = buf.get_u8();
28916        __struct.mppt3_status = buf.get_u8();
28917        Ok(__struct)
28918    }
28919    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28920        let mut __tmp = BytesMut::new(bytes);
28921        #[allow(clippy::absurd_extreme_comparisons)]
28922        #[allow(unused_comparisons)]
28923        if __tmp.remaining() < Self::ENCODED_LEN {
28924            panic!(
28925                "buffer is too small (need {} bytes, but got {})",
28926                Self::ENCODED_LEN,
28927                __tmp.remaining(),
28928            )
28929        }
28930        __tmp.put_u64_le(self.mppt_timestamp);
28931        __tmp.put_f32_le(self.mppt1_volt);
28932        __tmp.put_f32_le(self.mppt1_amp);
28933        __tmp.put_f32_le(self.mppt2_volt);
28934        __tmp.put_f32_le(self.mppt2_amp);
28935        __tmp.put_f32_le(self.mppt3_volt);
28936        __tmp.put_f32_le(self.mppt3_amp);
28937        __tmp.put_u16_le(self.mppt1_pwm);
28938        __tmp.put_u16_le(self.mppt2_pwm);
28939        __tmp.put_u16_le(self.mppt3_pwm);
28940        __tmp.put_u8(self.mppt1_status);
28941        __tmp.put_u8(self.mppt2_status);
28942        __tmp.put_u8(self.mppt3_status);
28943        if matches!(version, MavlinkVersion::V2) {
28944            let len = __tmp.len();
28945            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28946        } else {
28947            __tmp.len()
28948        }
28949    }
28950}
28951#[doc = "Voltage and current sensor data."]
28952#[doc = ""]
28953#[doc = "ID: 8002"]
28954#[derive(Debug, Clone, PartialEq)]
28955#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28956#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28957#[cfg_attr(feature = "ts", derive(TS))]
28958#[cfg_attr(feature = "ts", ts(export))]
28959pub struct SENS_POWER_DATA {
28960    #[doc = "Power board voltage sensor reading"]
28961    pub adc121_vspb_volt: f32,
28962    #[doc = "Power board current sensor reading"]
28963    pub adc121_cspb_amp: f32,
28964    #[doc = "Board current sensor 1 reading"]
28965    pub adc121_cs1_amp: f32,
28966    #[doc = "Board current sensor 2 reading"]
28967    pub adc121_cs2_amp: f32,
28968}
28969impl SENS_POWER_DATA {
28970    pub const ENCODED_LEN: usize = 16usize;
28971    pub const DEFAULT: Self = Self {
28972        adc121_vspb_volt: 0.0_f32,
28973        adc121_cspb_amp: 0.0_f32,
28974        adc121_cs1_amp: 0.0_f32,
28975        adc121_cs2_amp: 0.0_f32,
28976    };
28977    #[cfg(feature = "arbitrary")]
28978    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28979        use arbitrary::{Arbitrary, Unstructured};
28980        let mut buf = [0u8; 1024];
28981        rng.fill_bytes(&mut buf);
28982        let mut unstructured = Unstructured::new(&buf);
28983        Self::arbitrary(&mut unstructured).unwrap_or_default()
28984    }
28985}
28986impl Default for SENS_POWER_DATA {
28987    fn default() -> Self {
28988        Self::DEFAULT.clone()
28989    }
28990}
28991impl MessageData for SENS_POWER_DATA {
28992    type Message = MavMessage;
28993    const ID: u32 = 8002u32;
28994    const NAME: &'static str = "SENS_POWER";
28995    const EXTRA_CRC: u8 = 218u8;
28996    const ENCODED_LEN: usize = 16usize;
28997    fn deser(
28998        _version: MavlinkVersion,
28999        __input: &[u8],
29000    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29001        let avail_len = __input.len();
29002        let mut payload_buf = [0; Self::ENCODED_LEN];
29003        let mut buf = if avail_len < Self::ENCODED_LEN {
29004            payload_buf[0..avail_len].copy_from_slice(__input);
29005            Bytes::new(&payload_buf)
29006        } else {
29007            Bytes::new(__input)
29008        };
29009        let mut __struct = Self::default();
29010        __struct.adc121_vspb_volt = buf.get_f32_le();
29011        __struct.adc121_cspb_amp = buf.get_f32_le();
29012        __struct.adc121_cs1_amp = buf.get_f32_le();
29013        __struct.adc121_cs2_amp = buf.get_f32_le();
29014        Ok(__struct)
29015    }
29016    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29017        let mut __tmp = BytesMut::new(bytes);
29018        #[allow(clippy::absurd_extreme_comparisons)]
29019        #[allow(unused_comparisons)]
29020        if __tmp.remaining() < Self::ENCODED_LEN {
29021            panic!(
29022                "buffer is too small (need {} bytes, but got {})",
29023                Self::ENCODED_LEN,
29024                __tmp.remaining(),
29025            )
29026        }
29027        __tmp.put_f32_le(self.adc121_vspb_volt);
29028        __tmp.put_f32_le(self.adc121_cspb_amp);
29029        __tmp.put_f32_le(self.adc121_cs1_amp);
29030        __tmp.put_f32_le(self.adc121_cs2_amp);
29031        if matches!(version, MavlinkVersion::V2) {
29032            let len = __tmp.len();
29033            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29034        } else {
29035            __tmp.len()
29036        }
29037    }
29038}
29039#[doc = "Monitoring of power board status."]
29040#[doc = ""]
29041#[doc = "ID: 8013"]
29042#[derive(Debug, Clone, PartialEq)]
29043#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29044#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29045#[cfg_attr(feature = "ts", derive(TS))]
29046#[cfg_attr(feature = "ts", ts(export))]
29047pub struct SENS_POWER_BOARD_DATA {
29048    #[doc = "Timestamp"]
29049    pub timestamp: u64,
29050    #[doc = "Power board system voltage"]
29051    pub pwr_brd_system_volt: f32,
29052    #[doc = "Power board servo voltage"]
29053    pub pwr_brd_servo_volt: f32,
29054    #[doc = "Power board digital voltage"]
29055    pub pwr_brd_digital_volt: f32,
29056    #[doc = "Power board left motor current sensor"]
29057    pub pwr_brd_mot_l_amp: f32,
29058    #[doc = "Power board right motor current sensor"]
29059    pub pwr_brd_mot_r_amp: f32,
29060    #[doc = "Power board analog current sensor"]
29061    pub pwr_brd_analog_amp: f32,
29062    #[doc = "Power board digital current sensor"]
29063    pub pwr_brd_digital_amp: f32,
29064    #[doc = "Power board extension current sensor"]
29065    pub pwr_brd_ext_amp: f32,
29066    #[doc = "Power board aux current sensor"]
29067    pub pwr_brd_aux_amp: f32,
29068    #[doc = "Power board status register"]
29069    pub pwr_brd_status: u8,
29070    #[doc = "Power board leds status"]
29071    pub pwr_brd_led_status: u8,
29072}
29073impl SENS_POWER_BOARD_DATA {
29074    pub const ENCODED_LEN: usize = 46usize;
29075    pub const DEFAULT: Self = Self {
29076        timestamp: 0_u64,
29077        pwr_brd_system_volt: 0.0_f32,
29078        pwr_brd_servo_volt: 0.0_f32,
29079        pwr_brd_digital_volt: 0.0_f32,
29080        pwr_brd_mot_l_amp: 0.0_f32,
29081        pwr_brd_mot_r_amp: 0.0_f32,
29082        pwr_brd_analog_amp: 0.0_f32,
29083        pwr_brd_digital_amp: 0.0_f32,
29084        pwr_brd_ext_amp: 0.0_f32,
29085        pwr_brd_aux_amp: 0.0_f32,
29086        pwr_brd_status: 0_u8,
29087        pwr_brd_led_status: 0_u8,
29088    };
29089    #[cfg(feature = "arbitrary")]
29090    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29091        use arbitrary::{Arbitrary, Unstructured};
29092        let mut buf = [0u8; 1024];
29093        rng.fill_bytes(&mut buf);
29094        let mut unstructured = Unstructured::new(&buf);
29095        Self::arbitrary(&mut unstructured).unwrap_or_default()
29096    }
29097}
29098impl Default for SENS_POWER_BOARD_DATA {
29099    fn default() -> Self {
29100        Self::DEFAULT.clone()
29101    }
29102}
29103impl MessageData for SENS_POWER_BOARD_DATA {
29104    type Message = MavMessage;
29105    const ID: u32 = 8013u32;
29106    const NAME: &'static str = "SENS_POWER_BOARD";
29107    const EXTRA_CRC: u8 = 222u8;
29108    const ENCODED_LEN: usize = 46usize;
29109    fn deser(
29110        _version: MavlinkVersion,
29111        __input: &[u8],
29112    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29113        let avail_len = __input.len();
29114        let mut payload_buf = [0; Self::ENCODED_LEN];
29115        let mut buf = if avail_len < Self::ENCODED_LEN {
29116            payload_buf[0..avail_len].copy_from_slice(__input);
29117            Bytes::new(&payload_buf)
29118        } else {
29119            Bytes::new(__input)
29120        };
29121        let mut __struct = Self::default();
29122        __struct.timestamp = buf.get_u64_le();
29123        __struct.pwr_brd_system_volt = buf.get_f32_le();
29124        __struct.pwr_brd_servo_volt = buf.get_f32_le();
29125        __struct.pwr_brd_digital_volt = buf.get_f32_le();
29126        __struct.pwr_brd_mot_l_amp = buf.get_f32_le();
29127        __struct.pwr_brd_mot_r_amp = buf.get_f32_le();
29128        __struct.pwr_brd_analog_amp = buf.get_f32_le();
29129        __struct.pwr_brd_digital_amp = buf.get_f32_le();
29130        __struct.pwr_brd_ext_amp = buf.get_f32_le();
29131        __struct.pwr_brd_aux_amp = buf.get_f32_le();
29132        __struct.pwr_brd_status = buf.get_u8();
29133        __struct.pwr_brd_led_status = buf.get_u8();
29134        Ok(__struct)
29135    }
29136    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29137        let mut __tmp = BytesMut::new(bytes);
29138        #[allow(clippy::absurd_extreme_comparisons)]
29139        #[allow(unused_comparisons)]
29140        if __tmp.remaining() < Self::ENCODED_LEN {
29141            panic!(
29142                "buffer is too small (need {} bytes, but got {})",
29143                Self::ENCODED_LEN,
29144                __tmp.remaining(),
29145            )
29146        }
29147        __tmp.put_u64_le(self.timestamp);
29148        __tmp.put_f32_le(self.pwr_brd_system_volt);
29149        __tmp.put_f32_le(self.pwr_brd_servo_volt);
29150        __tmp.put_f32_le(self.pwr_brd_digital_volt);
29151        __tmp.put_f32_le(self.pwr_brd_mot_l_amp);
29152        __tmp.put_f32_le(self.pwr_brd_mot_r_amp);
29153        __tmp.put_f32_le(self.pwr_brd_analog_amp);
29154        __tmp.put_f32_le(self.pwr_brd_digital_amp);
29155        __tmp.put_f32_le(self.pwr_brd_ext_amp);
29156        __tmp.put_f32_le(self.pwr_brd_aux_amp);
29157        __tmp.put_u8(self.pwr_brd_status);
29158        __tmp.put_u8(self.pwr_brd_led_status);
29159        if matches!(version, MavlinkVersion::V2) {
29160            let len = __tmp.len();
29161            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29162        } else {
29163            __tmp.len()
29164        }
29165    }
29166}
29167#[doc = "Control a serial port. This can be used for raw access to an onboard serial peripheral such as a GPS or telemetry radio. It is designed to make it possible to update the devices firmware via MAVLink messages or change the devices settings. A message with zero bytes can be used to change just the baudrate."]
29168#[doc = ""]
29169#[doc = "ID: 126"]
29170#[derive(Debug, Clone, PartialEq)]
29171#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29172#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29173#[cfg_attr(feature = "ts", derive(TS))]
29174#[cfg_attr(feature = "ts", ts(export))]
29175pub struct SERIAL_CONTROL_DATA {
29176    #[doc = "Baudrate of transfer. Zero means no change."]
29177    pub baudrate: u32,
29178    #[doc = "Timeout for reply data"]
29179    pub timeout: u16,
29180    #[doc = "Serial control device type."]
29181    pub device: SerialControlDev,
29182    #[doc = "Bitmap of serial control flags."]
29183    pub flags: SerialControlFlag,
29184    #[doc = "how many bytes in this transfer"]
29185    pub count: u8,
29186    #[doc = "serial data"]
29187    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29188    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
29189    pub data: [u8; 70],
29190    #[doc = "System ID"]
29191    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29192    pub target_system: u8,
29193    #[doc = "Component ID"]
29194    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29195    pub target_component: u8,
29196}
29197impl SERIAL_CONTROL_DATA {
29198    pub const ENCODED_LEN: usize = 81usize;
29199    pub const DEFAULT: Self = Self {
29200        baudrate: 0_u32,
29201        timeout: 0_u16,
29202        device: SerialControlDev::DEFAULT,
29203        flags: SerialControlFlag::DEFAULT,
29204        count: 0_u8,
29205        data: [0_u8; 70usize],
29206        target_system: 0_u8,
29207        target_component: 0_u8,
29208    };
29209    #[cfg(feature = "arbitrary")]
29210    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29211        use arbitrary::{Arbitrary, Unstructured};
29212        let mut buf = [0u8; 1024];
29213        rng.fill_bytes(&mut buf);
29214        let mut unstructured = Unstructured::new(&buf);
29215        Self::arbitrary(&mut unstructured).unwrap_or_default()
29216    }
29217}
29218impl Default for SERIAL_CONTROL_DATA {
29219    fn default() -> Self {
29220        Self::DEFAULT.clone()
29221    }
29222}
29223impl MessageData for SERIAL_CONTROL_DATA {
29224    type Message = MavMessage;
29225    const ID: u32 = 126u32;
29226    const NAME: &'static str = "SERIAL_CONTROL";
29227    const EXTRA_CRC: u8 = 220u8;
29228    const ENCODED_LEN: usize = 81usize;
29229    fn deser(
29230        _version: MavlinkVersion,
29231        __input: &[u8],
29232    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29233        let avail_len = __input.len();
29234        let mut payload_buf = [0; Self::ENCODED_LEN];
29235        let mut buf = if avail_len < Self::ENCODED_LEN {
29236            payload_buf[0..avail_len].copy_from_slice(__input);
29237            Bytes::new(&payload_buf)
29238        } else {
29239            Bytes::new(__input)
29240        };
29241        let mut __struct = Self::default();
29242        __struct.baudrate = buf.get_u32_le();
29243        __struct.timeout = buf.get_u16_le();
29244        let tmp = buf.get_u8();
29245        __struct.device =
29246            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29247                enum_type: "SerialControlDev",
29248                value: tmp as u32,
29249            })?;
29250        let tmp = buf.get_u8();
29251        __struct.flags = SerialControlFlag::from_bits(tmp & SerialControlFlag::all().bits())
29252            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29253                flag_type: "SerialControlFlag",
29254                value: tmp as u32,
29255            })?;
29256        __struct.count = buf.get_u8();
29257        for v in &mut __struct.data {
29258            let val = buf.get_u8();
29259            *v = val;
29260        }
29261        __struct.target_system = buf.get_u8();
29262        __struct.target_component = buf.get_u8();
29263        Ok(__struct)
29264    }
29265    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29266        let mut __tmp = BytesMut::new(bytes);
29267        #[allow(clippy::absurd_extreme_comparisons)]
29268        #[allow(unused_comparisons)]
29269        if __tmp.remaining() < Self::ENCODED_LEN {
29270            panic!(
29271                "buffer is too small (need {} bytes, but got {})",
29272                Self::ENCODED_LEN,
29273                __tmp.remaining(),
29274            )
29275        }
29276        __tmp.put_u32_le(self.baudrate);
29277        __tmp.put_u16_le(self.timeout);
29278        __tmp.put_u8(self.device as u8);
29279        __tmp.put_u8(self.flags.bits());
29280        __tmp.put_u8(self.count);
29281        for val in &self.data {
29282            __tmp.put_u8(*val);
29283        }
29284        if matches!(version, MavlinkVersion::V2) {
29285            __tmp.put_u8(self.target_system);
29286            __tmp.put_u8(self.target_component);
29287            let len = __tmp.len();
29288            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29289        } else {
29290            __tmp.len()
29291        }
29292    }
29293}
29294#[doc = "Superseded by ACTUATOR_OUTPUT_STATUS. The RAW values of the servo outputs (for RC input from the remote, use the RC_CHANNELS messages). The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%."]
29295#[doc = ""]
29296#[doc = "ID: 36"]
29297#[derive(Debug, Clone, PartialEq)]
29298#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29299#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29300#[cfg_attr(feature = "ts", derive(TS))]
29301#[cfg_attr(feature = "ts", ts(export))]
29302pub struct SERVO_OUTPUT_RAW_DATA {
29303    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
29304    pub time_usec: u32,
29305    #[doc = "Servo output 1 value"]
29306    pub servo1_raw: u16,
29307    #[doc = "Servo output 2 value"]
29308    pub servo2_raw: u16,
29309    #[doc = "Servo output 3 value"]
29310    pub servo3_raw: u16,
29311    #[doc = "Servo output 4 value"]
29312    pub servo4_raw: u16,
29313    #[doc = "Servo output 5 value"]
29314    pub servo5_raw: u16,
29315    #[doc = "Servo output 6 value"]
29316    pub servo6_raw: u16,
29317    #[doc = "Servo output 7 value"]
29318    pub servo7_raw: u16,
29319    #[doc = "Servo output 8 value"]
29320    pub servo8_raw: u16,
29321    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
29322    pub port: u8,
29323    #[doc = "Servo output 9 value"]
29324    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29325    pub servo9_raw: u16,
29326    #[doc = "Servo output 10 value"]
29327    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29328    pub servo10_raw: u16,
29329    #[doc = "Servo output 11 value"]
29330    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29331    pub servo11_raw: u16,
29332    #[doc = "Servo output 12 value"]
29333    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29334    pub servo12_raw: u16,
29335    #[doc = "Servo output 13 value"]
29336    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29337    pub servo13_raw: u16,
29338    #[doc = "Servo output 14 value"]
29339    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29340    pub servo14_raw: u16,
29341    #[doc = "Servo output 15 value"]
29342    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29343    pub servo15_raw: u16,
29344    #[doc = "Servo output 16 value"]
29345    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29346    pub servo16_raw: u16,
29347}
29348impl SERVO_OUTPUT_RAW_DATA {
29349    pub const ENCODED_LEN: usize = 37usize;
29350    pub const DEFAULT: Self = Self {
29351        time_usec: 0_u32,
29352        servo1_raw: 0_u16,
29353        servo2_raw: 0_u16,
29354        servo3_raw: 0_u16,
29355        servo4_raw: 0_u16,
29356        servo5_raw: 0_u16,
29357        servo6_raw: 0_u16,
29358        servo7_raw: 0_u16,
29359        servo8_raw: 0_u16,
29360        port: 0_u8,
29361        servo9_raw: 0_u16,
29362        servo10_raw: 0_u16,
29363        servo11_raw: 0_u16,
29364        servo12_raw: 0_u16,
29365        servo13_raw: 0_u16,
29366        servo14_raw: 0_u16,
29367        servo15_raw: 0_u16,
29368        servo16_raw: 0_u16,
29369    };
29370    #[cfg(feature = "arbitrary")]
29371    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29372        use arbitrary::{Arbitrary, Unstructured};
29373        let mut buf = [0u8; 1024];
29374        rng.fill_bytes(&mut buf);
29375        let mut unstructured = Unstructured::new(&buf);
29376        Self::arbitrary(&mut unstructured).unwrap_or_default()
29377    }
29378}
29379impl Default for SERVO_OUTPUT_RAW_DATA {
29380    fn default() -> Self {
29381        Self::DEFAULT.clone()
29382    }
29383}
29384impl MessageData for SERVO_OUTPUT_RAW_DATA {
29385    type Message = MavMessage;
29386    const ID: u32 = 36u32;
29387    const NAME: &'static str = "SERVO_OUTPUT_RAW";
29388    const EXTRA_CRC: u8 = 222u8;
29389    const ENCODED_LEN: usize = 37usize;
29390    fn deser(
29391        _version: MavlinkVersion,
29392        __input: &[u8],
29393    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29394        let avail_len = __input.len();
29395        let mut payload_buf = [0; Self::ENCODED_LEN];
29396        let mut buf = if avail_len < Self::ENCODED_LEN {
29397            payload_buf[0..avail_len].copy_from_slice(__input);
29398            Bytes::new(&payload_buf)
29399        } else {
29400            Bytes::new(__input)
29401        };
29402        let mut __struct = Self::default();
29403        __struct.time_usec = buf.get_u32_le();
29404        __struct.servo1_raw = buf.get_u16_le();
29405        __struct.servo2_raw = buf.get_u16_le();
29406        __struct.servo3_raw = buf.get_u16_le();
29407        __struct.servo4_raw = buf.get_u16_le();
29408        __struct.servo5_raw = buf.get_u16_le();
29409        __struct.servo6_raw = buf.get_u16_le();
29410        __struct.servo7_raw = buf.get_u16_le();
29411        __struct.servo8_raw = buf.get_u16_le();
29412        __struct.port = buf.get_u8();
29413        __struct.servo9_raw = buf.get_u16_le();
29414        __struct.servo10_raw = buf.get_u16_le();
29415        __struct.servo11_raw = buf.get_u16_le();
29416        __struct.servo12_raw = buf.get_u16_le();
29417        __struct.servo13_raw = buf.get_u16_le();
29418        __struct.servo14_raw = buf.get_u16_le();
29419        __struct.servo15_raw = buf.get_u16_le();
29420        __struct.servo16_raw = buf.get_u16_le();
29421        Ok(__struct)
29422    }
29423    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29424        let mut __tmp = BytesMut::new(bytes);
29425        #[allow(clippy::absurd_extreme_comparisons)]
29426        #[allow(unused_comparisons)]
29427        if __tmp.remaining() < Self::ENCODED_LEN {
29428            panic!(
29429                "buffer is too small (need {} bytes, but got {})",
29430                Self::ENCODED_LEN,
29431                __tmp.remaining(),
29432            )
29433        }
29434        __tmp.put_u32_le(self.time_usec);
29435        __tmp.put_u16_le(self.servo1_raw);
29436        __tmp.put_u16_le(self.servo2_raw);
29437        __tmp.put_u16_le(self.servo3_raw);
29438        __tmp.put_u16_le(self.servo4_raw);
29439        __tmp.put_u16_le(self.servo5_raw);
29440        __tmp.put_u16_le(self.servo6_raw);
29441        __tmp.put_u16_le(self.servo7_raw);
29442        __tmp.put_u16_le(self.servo8_raw);
29443        __tmp.put_u8(self.port);
29444        if matches!(version, MavlinkVersion::V2) {
29445            __tmp.put_u16_le(self.servo9_raw);
29446            __tmp.put_u16_le(self.servo10_raw);
29447            __tmp.put_u16_le(self.servo11_raw);
29448            __tmp.put_u16_le(self.servo12_raw);
29449            __tmp.put_u16_le(self.servo13_raw);
29450            __tmp.put_u16_le(self.servo14_raw);
29451            __tmp.put_u16_le(self.servo15_raw);
29452            __tmp.put_u16_le(self.servo16_raw);
29453            let len = __tmp.len();
29454            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29455        } else {
29456            __tmp.len()
29457        }
29458    }
29459}
29460#[doc = "Setup a MAVLink2 signing key. If called with secret_key of all zero and zero initial_timestamp will disable signing."]
29461#[doc = ""]
29462#[doc = "ID: 256"]
29463#[derive(Debug, Clone, PartialEq)]
29464#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29465#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29466#[cfg_attr(feature = "ts", derive(TS))]
29467#[cfg_attr(feature = "ts", ts(export))]
29468pub struct SETUP_SIGNING_DATA {
29469    #[doc = "initial timestamp"]
29470    pub initial_timestamp: u64,
29471    #[doc = "system id of the target"]
29472    pub target_system: u8,
29473    #[doc = "component ID of the target"]
29474    pub target_component: u8,
29475    #[doc = "signing key"]
29476    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29477    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
29478    pub secret_key: [u8; 32],
29479}
29480impl SETUP_SIGNING_DATA {
29481    pub const ENCODED_LEN: usize = 42usize;
29482    pub const DEFAULT: Self = Self {
29483        initial_timestamp: 0_u64,
29484        target_system: 0_u8,
29485        target_component: 0_u8,
29486        secret_key: [0_u8; 32usize],
29487    };
29488    #[cfg(feature = "arbitrary")]
29489    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29490        use arbitrary::{Arbitrary, Unstructured};
29491        let mut buf = [0u8; 1024];
29492        rng.fill_bytes(&mut buf);
29493        let mut unstructured = Unstructured::new(&buf);
29494        Self::arbitrary(&mut unstructured).unwrap_or_default()
29495    }
29496}
29497impl Default for SETUP_SIGNING_DATA {
29498    fn default() -> Self {
29499        Self::DEFAULT.clone()
29500    }
29501}
29502impl MessageData for SETUP_SIGNING_DATA {
29503    type Message = MavMessage;
29504    const ID: u32 = 256u32;
29505    const NAME: &'static str = "SETUP_SIGNING";
29506    const EXTRA_CRC: u8 = 71u8;
29507    const ENCODED_LEN: usize = 42usize;
29508    fn deser(
29509        _version: MavlinkVersion,
29510        __input: &[u8],
29511    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29512        let avail_len = __input.len();
29513        let mut payload_buf = [0; Self::ENCODED_LEN];
29514        let mut buf = if avail_len < Self::ENCODED_LEN {
29515            payload_buf[0..avail_len].copy_from_slice(__input);
29516            Bytes::new(&payload_buf)
29517        } else {
29518            Bytes::new(__input)
29519        };
29520        let mut __struct = Self::default();
29521        __struct.initial_timestamp = buf.get_u64_le();
29522        __struct.target_system = buf.get_u8();
29523        __struct.target_component = buf.get_u8();
29524        for v in &mut __struct.secret_key {
29525            let val = buf.get_u8();
29526            *v = val;
29527        }
29528        Ok(__struct)
29529    }
29530    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29531        let mut __tmp = BytesMut::new(bytes);
29532        #[allow(clippy::absurd_extreme_comparisons)]
29533        #[allow(unused_comparisons)]
29534        if __tmp.remaining() < Self::ENCODED_LEN {
29535            panic!(
29536                "buffer is too small (need {} bytes, but got {})",
29537                Self::ENCODED_LEN,
29538                __tmp.remaining(),
29539            )
29540        }
29541        __tmp.put_u64_le(self.initial_timestamp);
29542        __tmp.put_u8(self.target_system);
29543        __tmp.put_u8(self.target_component);
29544        for val in &self.secret_key {
29545            __tmp.put_u8(*val);
29546        }
29547        if matches!(version, MavlinkVersion::V2) {
29548            let len = __tmp.len();
29549            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29550        } else {
29551            __tmp.len()
29552        }
29553    }
29554}
29555#[doc = "Set the vehicle attitude and body angular rates."]
29556#[doc = ""]
29557#[doc = "ID: 139"]
29558#[derive(Debug, Clone, PartialEq)]
29559#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29560#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29561#[cfg_attr(feature = "ts", derive(TS))]
29562#[cfg_attr(feature = "ts", ts(export))]
29563pub struct SET_ACTUATOR_CONTROL_TARGET_DATA {
29564    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
29565    pub time_usec: u64,
29566    #[doc = "Actuator controls. Normed to -1..+1 where 0 is neutral position. Throttle for single rotation direction motors is 0..1, negative range for reverse direction. Standard mapping for attitude controls (group 0): (index 0-7): roll, pitch, yaw, throttle, flaps, spoilers, airbrakes, landing gear. Load a pass-through mixer to repurpose them as generic outputs."]
29567    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29568    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
29569    pub controls: [f32; 8],
29570    #[doc = "Actuator group. The \"_mlx\" indicates this is a multi-instance message and a MAVLink parser should use this field to difference between instances."]
29571    pub group_mlx: u8,
29572    #[doc = "System ID"]
29573    pub target_system: u8,
29574    #[doc = "Component ID"]
29575    pub target_component: u8,
29576}
29577impl SET_ACTUATOR_CONTROL_TARGET_DATA {
29578    pub const ENCODED_LEN: usize = 43usize;
29579    pub const DEFAULT: Self = Self {
29580        time_usec: 0_u64,
29581        controls: [0.0_f32; 8usize],
29582        group_mlx: 0_u8,
29583        target_system: 0_u8,
29584        target_component: 0_u8,
29585    };
29586    #[cfg(feature = "arbitrary")]
29587    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29588        use arbitrary::{Arbitrary, Unstructured};
29589        let mut buf = [0u8; 1024];
29590        rng.fill_bytes(&mut buf);
29591        let mut unstructured = Unstructured::new(&buf);
29592        Self::arbitrary(&mut unstructured).unwrap_or_default()
29593    }
29594}
29595impl Default for SET_ACTUATOR_CONTROL_TARGET_DATA {
29596    fn default() -> Self {
29597        Self::DEFAULT.clone()
29598    }
29599}
29600impl MessageData for SET_ACTUATOR_CONTROL_TARGET_DATA {
29601    type Message = MavMessage;
29602    const ID: u32 = 139u32;
29603    const NAME: &'static str = "SET_ACTUATOR_CONTROL_TARGET";
29604    const EXTRA_CRC: u8 = 168u8;
29605    const ENCODED_LEN: usize = 43usize;
29606    fn deser(
29607        _version: MavlinkVersion,
29608        __input: &[u8],
29609    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29610        let avail_len = __input.len();
29611        let mut payload_buf = [0; Self::ENCODED_LEN];
29612        let mut buf = if avail_len < Self::ENCODED_LEN {
29613            payload_buf[0..avail_len].copy_from_slice(__input);
29614            Bytes::new(&payload_buf)
29615        } else {
29616            Bytes::new(__input)
29617        };
29618        let mut __struct = Self::default();
29619        __struct.time_usec = buf.get_u64_le();
29620        for v in &mut __struct.controls {
29621            let val = buf.get_f32_le();
29622            *v = val;
29623        }
29624        __struct.group_mlx = buf.get_u8();
29625        __struct.target_system = buf.get_u8();
29626        __struct.target_component = buf.get_u8();
29627        Ok(__struct)
29628    }
29629    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29630        let mut __tmp = BytesMut::new(bytes);
29631        #[allow(clippy::absurd_extreme_comparisons)]
29632        #[allow(unused_comparisons)]
29633        if __tmp.remaining() < Self::ENCODED_LEN {
29634            panic!(
29635                "buffer is too small (need {} bytes, but got {})",
29636                Self::ENCODED_LEN,
29637                __tmp.remaining(),
29638            )
29639        }
29640        __tmp.put_u64_le(self.time_usec);
29641        for val in &self.controls {
29642            __tmp.put_f32_le(*val);
29643        }
29644        __tmp.put_u8(self.group_mlx);
29645        __tmp.put_u8(self.target_system);
29646        __tmp.put_u8(self.target_component);
29647        if matches!(version, MavlinkVersion::V2) {
29648            let len = __tmp.len();
29649            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29650        } else {
29651            __tmp.len()
29652        }
29653    }
29654}
29655#[doc = "Sets a desired vehicle attitude. Used by an external controller to command the vehicle (manual controller or other system)."]
29656#[doc = ""]
29657#[doc = "ID: 82"]
29658#[derive(Debug, Clone, PartialEq)]
29659#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29660#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29661#[cfg_attr(feature = "ts", derive(TS))]
29662#[cfg_attr(feature = "ts", ts(export))]
29663pub struct SET_ATTITUDE_TARGET_DATA {
29664    #[doc = "Timestamp (time since system boot)."]
29665    pub time_boot_ms: u32,
29666    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0) from MAV_FRAME_LOCAL_NED to MAV_FRAME_BODY_FRD"]
29667    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29668    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
29669    pub q: [f32; 4],
29670    #[doc = "Body roll rate"]
29671    pub body_roll_rate: f32,
29672    #[doc = "Body pitch rate"]
29673    pub body_pitch_rate: f32,
29674    #[doc = "Body yaw rate"]
29675    pub body_yaw_rate: f32,
29676    #[doc = "Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust)"]
29677    pub thrust: f32,
29678    #[doc = "System ID"]
29679    pub target_system: u8,
29680    #[doc = "Component ID"]
29681    pub target_component: u8,
29682    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
29683    pub type_mask: AttitudeTargetTypemask,
29684    #[doc = "3D thrust setpoint in the body NED frame, normalized to -1 .. 1"]
29685    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29686    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29687    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
29688    pub thrust_body: [f32; 3],
29689}
29690impl SET_ATTITUDE_TARGET_DATA {
29691    pub const ENCODED_LEN: usize = 51usize;
29692    pub const DEFAULT: Self = Self {
29693        time_boot_ms: 0_u32,
29694        q: [0.0_f32; 4usize],
29695        body_roll_rate: 0.0_f32,
29696        body_pitch_rate: 0.0_f32,
29697        body_yaw_rate: 0.0_f32,
29698        thrust: 0.0_f32,
29699        target_system: 0_u8,
29700        target_component: 0_u8,
29701        type_mask: AttitudeTargetTypemask::DEFAULT,
29702        thrust_body: [0.0_f32; 3usize],
29703    };
29704    #[cfg(feature = "arbitrary")]
29705    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29706        use arbitrary::{Arbitrary, Unstructured};
29707        let mut buf = [0u8; 1024];
29708        rng.fill_bytes(&mut buf);
29709        let mut unstructured = Unstructured::new(&buf);
29710        Self::arbitrary(&mut unstructured).unwrap_or_default()
29711    }
29712}
29713impl Default for SET_ATTITUDE_TARGET_DATA {
29714    fn default() -> Self {
29715        Self::DEFAULT.clone()
29716    }
29717}
29718impl MessageData for SET_ATTITUDE_TARGET_DATA {
29719    type Message = MavMessage;
29720    const ID: u32 = 82u32;
29721    const NAME: &'static str = "SET_ATTITUDE_TARGET";
29722    const EXTRA_CRC: u8 = 49u8;
29723    const ENCODED_LEN: usize = 51usize;
29724    fn deser(
29725        _version: MavlinkVersion,
29726        __input: &[u8],
29727    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29728        let avail_len = __input.len();
29729        let mut payload_buf = [0; Self::ENCODED_LEN];
29730        let mut buf = if avail_len < Self::ENCODED_LEN {
29731            payload_buf[0..avail_len].copy_from_slice(__input);
29732            Bytes::new(&payload_buf)
29733        } else {
29734            Bytes::new(__input)
29735        };
29736        let mut __struct = Self::default();
29737        __struct.time_boot_ms = buf.get_u32_le();
29738        for v in &mut __struct.q {
29739            let val = buf.get_f32_le();
29740            *v = val;
29741        }
29742        __struct.body_roll_rate = buf.get_f32_le();
29743        __struct.body_pitch_rate = buf.get_f32_le();
29744        __struct.body_yaw_rate = buf.get_f32_le();
29745        __struct.thrust = buf.get_f32_le();
29746        __struct.target_system = buf.get_u8();
29747        __struct.target_component = buf.get_u8();
29748        let tmp = buf.get_u8();
29749        __struct.type_mask = AttitudeTargetTypemask::from_bits(
29750            tmp & AttitudeTargetTypemask::all().bits(),
29751        )
29752        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29753            flag_type: "AttitudeTargetTypemask",
29754            value: tmp as u32,
29755        })?;
29756        for v in &mut __struct.thrust_body {
29757            let val = buf.get_f32_le();
29758            *v = val;
29759        }
29760        Ok(__struct)
29761    }
29762    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29763        let mut __tmp = BytesMut::new(bytes);
29764        #[allow(clippy::absurd_extreme_comparisons)]
29765        #[allow(unused_comparisons)]
29766        if __tmp.remaining() < Self::ENCODED_LEN {
29767            panic!(
29768                "buffer is too small (need {} bytes, but got {})",
29769                Self::ENCODED_LEN,
29770                __tmp.remaining(),
29771            )
29772        }
29773        __tmp.put_u32_le(self.time_boot_ms);
29774        for val in &self.q {
29775            __tmp.put_f32_le(*val);
29776        }
29777        __tmp.put_f32_le(self.body_roll_rate);
29778        __tmp.put_f32_le(self.body_pitch_rate);
29779        __tmp.put_f32_le(self.body_yaw_rate);
29780        __tmp.put_f32_le(self.thrust);
29781        __tmp.put_u8(self.target_system);
29782        __tmp.put_u8(self.target_component);
29783        __tmp.put_u8(self.type_mask.bits());
29784        if matches!(version, MavlinkVersion::V2) {
29785            for val in &self.thrust_body {
29786                __tmp.put_f32_le(*val);
29787            }
29788            let len = __tmp.len();
29789            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29790        } else {
29791            __tmp.len()
29792        }
29793    }
29794}
29795#[deprecated = " See `MAV_CMD_SET_GLOBAL_ORIGIN` (Deprecated since 2025-04)"]
29796#[doc = "Sets the GPS coordinates of the vehicle local origin (0,0,0) position. Vehicle should emit GPS_GLOBAL_ORIGIN irrespective of whether the origin is changed. This enables transform between the local coordinate frame and the global (GPS) coordinate frame, which may be necessary when (for example) indoor and outdoor settings are connected and the MAV should move from in- to outdoor."]
29797#[doc = ""]
29798#[doc = "ID: 48"]
29799#[derive(Debug, Clone, PartialEq)]
29800#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29801#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29802#[cfg_attr(feature = "ts", derive(TS))]
29803#[cfg_attr(feature = "ts", ts(export))]
29804pub struct SET_GPS_GLOBAL_ORIGIN_DATA {
29805    #[doc = "Latitude (WGS84)"]
29806    pub latitude: i32,
29807    #[doc = "Longitude (WGS84)"]
29808    pub longitude: i32,
29809    #[doc = "Altitude (MSL). Positive for up."]
29810    pub altitude: i32,
29811    #[doc = "System ID"]
29812    pub target_system: u8,
29813    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
29814    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29815    pub time_usec: u64,
29816}
29817impl SET_GPS_GLOBAL_ORIGIN_DATA {
29818    pub const ENCODED_LEN: usize = 21usize;
29819    pub const DEFAULT: Self = Self {
29820        latitude: 0_i32,
29821        longitude: 0_i32,
29822        altitude: 0_i32,
29823        target_system: 0_u8,
29824        time_usec: 0_u64,
29825    };
29826    #[cfg(feature = "arbitrary")]
29827    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29828        use arbitrary::{Arbitrary, Unstructured};
29829        let mut buf = [0u8; 1024];
29830        rng.fill_bytes(&mut buf);
29831        let mut unstructured = Unstructured::new(&buf);
29832        Self::arbitrary(&mut unstructured).unwrap_or_default()
29833    }
29834}
29835impl Default for SET_GPS_GLOBAL_ORIGIN_DATA {
29836    fn default() -> Self {
29837        Self::DEFAULT.clone()
29838    }
29839}
29840impl MessageData for SET_GPS_GLOBAL_ORIGIN_DATA {
29841    type Message = MavMessage;
29842    const ID: u32 = 48u32;
29843    const NAME: &'static str = "SET_GPS_GLOBAL_ORIGIN";
29844    const EXTRA_CRC: u8 = 41u8;
29845    const ENCODED_LEN: usize = 21usize;
29846    fn deser(
29847        _version: MavlinkVersion,
29848        __input: &[u8],
29849    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29850        let avail_len = __input.len();
29851        let mut payload_buf = [0; Self::ENCODED_LEN];
29852        let mut buf = if avail_len < Self::ENCODED_LEN {
29853            payload_buf[0..avail_len].copy_from_slice(__input);
29854            Bytes::new(&payload_buf)
29855        } else {
29856            Bytes::new(__input)
29857        };
29858        let mut __struct = Self::default();
29859        __struct.latitude = buf.get_i32_le();
29860        __struct.longitude = buf.get_i32_le();
29861        __struct.altitude = buf.get_i32_le();
29862        __struct.target_system = buf.get_u8();
29863        __struct.time_usec = buf.get_u64_le();
29864        Ok(__struct)
29865    }
29866    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29867        let mut __tmp = BytesMut::new(bytes);
29868        #[allow(clippy::absurd_extreme_comparisons)]
29869        #[allow(unused_comparisons)]
29870        if __tmp.remaining() < Self::ENCODED_LEN {
29871            panic!(
29872                "buffer is too small (need {} bytes, but got {})",
29873                Self::ENCODED_LEN,
29874                __tmp.remaining(),
29875            )
29876        }
29877        __tmp.put_i32_le(self.latitude);
29878        __tmp.put_i32_le(self.longitude);
29879        __tmp.put_i32_le(self.altitude);
29880        __tmp.put_u8(self.target_system);
29881        if matches!(version, MavlinkVersion::V2) {
29882            __tmp.put_u64_le(self.time_usec);
29883            let len = __tmp.len();
29884            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29885        } else {
29886            __tmp.len()
29887        }
29888    }
29889}
29890#[deprecated = "The command protocol version (MAV_CMD_DO_SET_HOME) allows a GCS to detect when setting the home position has failed. See `MAV_CMD_DO_SET_HOME` (Deprecated since 2022-02)"]
29891#[doc = "Sets the home position. \tThe home position is the default position that the system will return to and land on.         The position is set automatically by the system during the takeoff (and may also be set using this message).         The global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface.         Under normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach.         The approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
29892#[doc = ""]
29893#[doc = "ID: 243"]
29894#[derive(Debug, Clone, PartialEq)]
29895#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29896#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29897#[cfg_attr(feature = "ts", derive(TS))]
29898#[cfg_attr(feature = "ts", ts(export))]
29899pub struct SET_HOME_POSITION_DATA {
29900    #[doc = "Latitude (WGS84)"]
29901    pub latitude: i32,
29902    #[doc = "Longitude (WGS84)"]
29903    pub longitude: i32,
29904    #[doc = "Altitude (MSL). Positive for up."]
29905    pub altitude: i32,
29906    #[doc = "Local X position of this position in the local coordinate frame (NED)"]
29907    pub x: f32,
29908    #[doc = "Local Y position of this position in the local coordinate frame (NED)"]
29909    pub y: f32,
29910    #[doc = "Local Z position of this position in the local coordinate frame (NED: positive \"down\")"]
29911    pub z: f32,
29912    #[doc = "World to surface normal and heading transformation of the takeoff position. Used to indicate the heading and slope of the ground"]
29913    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29914    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
29915    pub q: [f32; 4],
29916    #[doc = "Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
29917    pub approach_x: f32,
29918    #[doc = "Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
29919    pub approach_y: f32,
29920    #[doc = "Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
29921    pub approach_z: f32,
29922    #[doc = "System ID."]
29923    pub target_system: u8,
29924    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
29925    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29926    pub time_usec: u64,
29927}
29928impl SET_HOME_POSITION_DATA {
29929    pub const ENCODED_LEN: usize = 61usize;
29930    pub const DEFAULT: Self = Self {
29931        latitude: 0_i32,
29932        longitude: 0_i32,
29933        altitude: 0_i32,
29934        x: 0.0_f32,
29935        y: 0.0_f32,
29936        z: 0.0_f32,
29937        q: [0.0_f32; 4usize],
29938        approach_x: 0.0_f32,
29939        approach_y: 0.0_f32,
29940        approach_z: 0.0_f32,
29941        target_system: 0_u8,
29942        time_usec: 0_u64,
29943    };
29944    #[cfg(feature = "arbitrary")]
29945    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29946        use arbitrary::{Arbitrary, Unstructured};
29947        let mut buf = [0u8; 1024];
29948        rng.fill_bytes(&mut buf);
29949        let mut unstructured = Unstructured::new(&buf);
29950        Self::arbitrary(&mut unstructured).unwrap_or_default()
29951    }
29952}
29953impl Default for SET_HOME_POSITION_DATA {
29954    fn default() -> Self {
29955        Self::DEFAULT.clone()
29956    }
29957}
29958impl MessageData for SET_HOME_POSITION_DATA {
29959    type Message = MavMessage;
29960    const ID: u32 = 243u32;
29961    const NAME: &'static str = "SET_HOME_POSITION";
29962    const EXTRA_CRC: u8 = 85u8;
29963    const ENCODED_LEN: usize = 61usize;
29964    fn deser(
29965        _version: MavlinkVersion,
29966        __input: &[u8],
29967    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29968        let avail_len = __input.len();
29969        let mut payload_buf = [0; Self::ENCODED_LEN];
29970        let mut buf = if avail_len < Self::ENCODED_LEN {
29971            payload_buf[0..avail_len].copy_from_slice(__input);
29972            Bytes::new(&payload_buf)
29973        } else {
29974            Bytes::new(__input)
29975        };
29976        let mut __struct = Self::default();
29977        __struct.latitude = buf.get_i32_le();
29978        __struct.longitude = buf.get_i32_le();
29979        __struct.altitude = buf.get_i32_le();
29980        __struct.x = buf.get_f32_le();
29981        __struct.y = buf.get_f32_le();
29982        __struct.z = buf.get_f32_le();
29983        for v in &mut __struct.q {
29984            let val = buf.get_f32_le();
29985            *v = val;
29986        }
29987        __struct.approach_x = buf.get_f32_le();
29988        __struct.approach_y = buf.get_f32_le();
29989        __struct.approach_z = buf.get_f32_le();
29990        __struct.target_system = buf.get_u8();
29991        __struct.time_usec = buf.get_u64_le();
29992        Ok(__struct)
29993    }
29994    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29995        let mut __tmp = BytesMut::new(bytes);
29996        #[allow(clippy::absurd_extreme_comparisons)]
29997        #[allow(unused_comparisons)]
29998        if __tmp.remaining() < Self::ENCODED_LEN {
29999            panic!(
30000                "buffer is too small (need {} bytes, but got {})",
30001                Self::ENCODED_LEN,
30002                __tmp.remaining(),
30003            )
30004        }
30005        __tmp.put_i32_le(self.latitude);
30006        __tmp.put_i32_le(self.longitude);
30007        __tmp.put_i32_le(self.altitude);
30008        __tmp.put_f32_le(self.x);
30009        __tmp.put_f32_le(self.y);
30010        __tmp.put_f32_le(self.z);
30011        for val in &self.q {
30012            __tmp.put_f32_le(*val);
30013        }
30014        __tmp.put_f32_le(self.approach_x);
30015        __tmp.put_f32_le(self.approach_y);
30016        __tmp.put_f32_le(self.approach_z);
30017        __tmp.put_u8(self.target_system);
30018        if matches!(version, MavlinkVersion::V2) {
30019            __tmp.put_u64_le(self.time_usec);
30020            let len = __tmp.len();
30021            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30022        } else {
30023            __tmp.len()
30024        }
30025    }
30026}
30027#[deprecated = "Use COMMAND_LONG with MAV_CMD_DO_SET_MODE instead. See `MAV_CMD_DO_SET_MODE` (Deprecated since 2015-12)"]
30028#[doc = "Set the system mode, as defined by enum MAV_MODE. There is no target component id as the mode is by definition for the overall aircraft, not only for one component."]
30029#[doc = ""]
30030#[doc = "ID: 11"]
30031#[derive(Debug, Clone, PartialEq)]
30032#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30033#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30034#[cfg_attr(feature = "ts", derive(TS))]
30035#[cfg_attr(feature = "ts", ts(export))]
30036pub struct SET_MODE_DATA {
30037    #[doc = "The new autopilot-specific mode. This field can be ignored by an autopilot."]
30038    pub custom_mode: u32,
30039    #[doc = "The system setting the mode"]
30040    pub target_system: u8,
30041    #[doc = "The new base mode."]
30042    pub base_mode: MavMode,
30043}
30044impl SET_MODE_DATA {
30045    pub const ENCODED_LEN: usize = 6usize;
30046    pub const DEFAULT: Self = Self {
30047        custom_mode: 0_u32,
30048        target_system: 0_u8,
30049        base_mode: MavMode::DEFAULT,
30050    };
30051    #[cfg(feature = "arbitrary")]
30052    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30053        use arbitrary::{Arbitrary, Unstructured};
30054        let mut buf = [0u8; 1024];
30055        rng.fill_bytes(&mut buf);
30056        let mut unstructured = Unstructured::new(&buf);
30057        Self::arbitrary(&mut unstructured).unwrap_or_default()
30058    }
30059}
30060impl Default for SET_MODE_DATA {
30061    fn default() -> Self {
30062        Self::DEFAULT.clone()
30063    }
30064}
30065impl MessageData for SET_MODE_DATA {
30066    type Message = MavMessage;
30067    const ID: u32 = 11u32;
30068    const NAME: &'static str = "SET_MODE";
30069    const EXTRA_CRC: u8 = 89u8;
30070    const ENCODED_LEN: usize = 6usize;
30071    fn deser(
30072        _version: MavlinkVersion,
30073        __input: &[u8],
30074    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30075        let avail_len = __input.len();
30076        let mut payload_buf = [0; Self::ENCODED_LEN];
30077        let mut buf = if avail_len < Self::ENCODED_LEN {
30078            payload_buf[0..avail_len].copy_from_slice(__input);
30079            Bytes::new(&payload_buf)
30080        } else {
30081            Bytes::new(__input)
30082        };
30083        let mut __struct = Self::default();
30084        __struct.custom_mode = buf.get_u32_le();
30085        __struct.target_system = buf.get_u8();
30086        let tmp = buf.get_u8();
30087        __struct.base_mode =
30088            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30089                enum_type: "MavMode",
30090                value: tmp as u32,
30091            })?;
30092        Ok(__struct)
30093    }
30094    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30095        let mut __tmp = BytesMut::new(bytes);
30096        #[allow(clippy::absurd_extreme_comparisons)]
30097        #[allow(unused_comparisons)]
30098        if __tmp.remaining() < Self::ENCODED_LEN {
30099            panic!(
30100                "buffer is too small (need {} bytes, but got {})",
30101                Self::ENCODED_LEN,
30102                __tmp.remaining(),
30103            )
30104        }
30105        __tmp.put_u32_le(self.custom_mode);
30106        __tmp.put_u8(self.target_system);
30107        __tmp.put_u8(self.base_mode as u8);
30108        if matches!(version, MavlinkVersion::V2) {
30109            let len = __tmp.len();
30110            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30111        } else {
30112            __tmp.len()
30113        }
30114    }
30115}
30116#[doc = "Sets a desired vehicle position, velocity, and/or acceleration in a global coordinate system (WGS84). Used by an external controller to command the vehicle (manual controller or other system)."]
30117#[doc = ""]
30118#[doc = "ID: 86"]
30119#[derive(Debug, Clone, PartialEq)]
30120#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30121#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30122#[cfg_attr(feature = "ts", derive(TS))]
30123#[cfg_attr(feature = "ts", ts(export))]
30124pub struct SET_POSITION_TARGET_GLOBAL_INT_DATA {
30125    #[doc = "Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency."]
30126    pub time_boot_ms: u32,
30127    #[doc = "Latitude in WGS84 frame"]
30128    pub lat_int: i32,
30129    #[doc = "Longitude in WGS84 frame"]
30130    pub lon_int: i32,
30131    #[doc = "Altitude (MSL, Relative to home, or AGL - depending on frame)"]
30132    pub alt: f32,
30133    #[doc = "X velocity in NED frame"]
30134    pub vx: f32,
30135    #[doc = "Y velocity in NED frame"]
30136    pub vy: f32,
30137    #[doc = "Z velocity in NED frame"]
30138    pub vz: f32,
30139    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
30140    pub afx: f32,
30141    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
30142    pub afy: f32,
30143    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
30144    pub afz: f32,
30145    #[doc = "yaw setpoint"]
30146    pub yaw: f32,
30147    #[doc = "yaw rate setpoint"]
30148    pub yaw_rate: f32,
30149    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
30150    pub type_mask: PositionTargetTypemask,
30151    #[doc = "System ID"]
30152    pub target_system: u8,
30153    #[doc = "Component ID"]
30154    pub target_component: u8,
30155    #[doc = "Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated)"]
30156    pub coordinate_frame: MavFrame,
30157}
30158impl SET_POSITION_TARGET_GLOBAL_INT_DATA {
30159    pub const ENCODED_LEN: usize = 53usize;
30160    pub const DEFAULT: Self = Self {
30161        time_boot_ms: 0_u32,
30162        lat_int: 0_i32,
30163        lon_int: 0_i32,
30164        alt: 0.0_f32,
30165        vx: 0.0_f32,
30166        vy: 0.0_f32,
30167        vz: 0.0_f32,
30168        afx: 0.0_f32,
30169        afy: 0.0_f32,
30170        afz: 0.0_f32,
30171        yaw: 0.0_f32,
30172        yaw_rate: 0.0_f32,
30173        type_mask: PositionTargetTypemask::DEFAULT,
30174        target_system: 0_u8,
30175        target_component: 0_u8,
30176        coordinate_frame: MavFrame::DEFAULT,
30177    };
30178    #[cfg(feature = "arbitrary")]
30179    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30180        use arbitrary::{Arbitrary, Unstructured};
30181        let mut buf = [0u8; 1024];
30182        rng.fill_bytes(&mut buf);
30183        let mut unstructured = Unstructured::new(&buf);
30184        Self::arbitrary(&mut unstructured).unwrap_or_default()
30185    }
30186}
30187impl Default for SET_POSITION_TARGET_GLOBAL_INT_DATA {
30188    fn default() -> Self {
30189        Self::DEFAULT.clone()
30190    }
30191}
30192impl MessageData for SET_POSITION_TARGET_GLOBAL_INT_DATA {
30193    type Message = MavMessage;
30194    const ID: u32 = 86u32;
30195    const NAME: &'static str = "SET_POSITION_TARGET_GLOBAL_INT";
30196    const EXTRA_CRC: u8 = 5u8;
30197    const ENCODED_LEN: usize = 53usize;
30198    fn deser(
30199        _version: MavlinkVersion,
30200        __input: &[u8],
30201    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30202        let avail_len = __input.len();
30203        let mut payload_buf = [0; Self::ENCODED_LEN];
30204        let mut buf = if avail_len < Self::ENCODED_LEN {
30205            payload_buf[0..avail_len].copy_from_slice(__input);
30206            Bytes::new(&payload_buf)
30207        } else {
30208            Bytes::new(__input)
30209        };
30210        let mut __struct = Self::default();
30211        __struct.time_boot_ms = buf.get_u32_le();
30212        __struct.lat_int = buf.get_i32_le();
30213        __struct.lon_int = buf.get_i32_le();
30214        __struct.alt = buf.get_f32_le();
30215        __struct.vx = buf.get_f32_le();
30216        __struct.vy = buf.get_f32_le();
30217        __struct.vz = buf.get_f32_le();
30218        __struct.afx = buf.get_f32_le();
30219        __struct.afy = buf.get_f32_le();
30220        __struct.afz = buf.get_f32_le();
30221        __struct.yaw = buf.get_f32_le();
30222        __struct.yaw_rate = buf.get_f32_le();
30223        let tmp = buf.get_u16_le();
30224        __struct.type_mask = PositionTargetTypemask::from_bits(
30225            tmp & PositionTargetTypemask::all().bits(),
30226        )
30227        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
30228            flag_type: "PositionTargetTypemask",
30229            value: tmp as u32,
30230        })?;
30231        __struct.target_system = buf.get_u8();
30232        __struct.target_component = buf.get_u8();
30233        let tmp = buf.get_u8();
30234        __struct.coordinate_frame =
30235            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30236                enum_type: "MavFrame",
30237                value: tmp as u32,
30238            })?;
30239        Ok(__struct)
30240    }
30241    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30242        let mut __tmp = BytesMut::new(bytes);
30243        #[allow(clippy::absurd_extreme_comparisons)]
30244        #[allow(unused_comparisons)]
30245        if __tmp.remaining() < Self::ENCODED_LEN {
30246            panic!(
30247                "buffer is too small (need {} bytes, but got {})",
30248                Self::ENCODED_LEN,
30249                __tmp.remaining(),
30250            )
30251        }
30252        __tmp.put_u32_le(self.time_boot_ms);
30253        __tmp.put_i32_le(self.lat_int);
30254        __tmp.put_i32_le(self.lon_int);
30255        __tmp.put_f32_le(self.alt);
30256        __tmp.put_f32_le(self.vx);
30257        __tmp.put_f32_le(self.vy);
30258        __tmp.put_f32_le(self.vz);
30259        __tmp.put_f32_le(self.afx);
30260        __tmp.put_f32_le(self.afy);
30261        __tmp.put_f32_le(self.afz);
30262        __tmp.put_f32_le(self.yaw);
30263        __tmp.put_f32_le(self.yaw_rate);
30264        __tmp.put_u16_le(self.type_mask.bits());
30265        __tmp.put_u8(self.target_system);
30266        __tmp.put_u8(self.target_component);
30267        __tmp.put_u8(self.coordinate_frame as u8);
30268        if matches!(version, MavlinkVersion::V2) {
30269            let len = __tmp.len();
30270            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30271        } else {
30272            __tmp.len()
30273        }
30274    }
30275}
30276#[doc = "Sets a desired vehicle position in a local north-east-down coordinate frame. Used by an external controller to command the vehicle (manual controller or other system)."]
30277#[doc = ""]
30278#[doc = "ID: 84"]
30279#[derive(Debug, Clone, PartialEq)]
30280#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30281#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30282#[cfg_attr(feature = "ts", derive(TS))]
30283#[cfg_attr(feature = "ts", ts(export))]
30284pub struct SET_POSITION_TARGET_LOCAL_NED_DATA {
30285    #[doc = "Timestamp (time since system boot)."]
30286    pub time_boot_ms: u32,
30287    #[doc = "X Position in NED frame"]
30288    pub x: f32,
30289    #[doc = "Y Position in NED frame"]
30290    pub y: f32,
30291    #[doc = "Z Position in NED frame (note, altitude is negative in NED)"]
30292    pub z: f32,
30293    #[doc = "X velocity in NED frame"]
30294    pub vx: f32,
30295    #[doc = "Y velocity in NED frame"]
30296    pub vy: f32,
30297    #[doc = "Z velocity in NED frame"]
30298    pub vz: f32,
30299    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
30300    pub afx: f32,
30301    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
30302    pub afy: f32,
30303    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
30304    pub afz: f32,
30305    #[doc = "yaw setpoint"]
30306    pub yaw: f32,
30307    #[doc = "yaw rate setpoint"]
30308    pub yaw_rate: f32,
30309    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
30310    pub type_mask: PositionTargetTypemask,
30311    #[doc = "System ID"]
30312    pub target_system: u8,
30313    #[doc = "Component ID"]
30314    pub target_component: u8,
30315    #[doc = "Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9"]
30316    pub coordinate_frame: MavFrame,
30317}
30318impl SET_POSITION_TARGET_LOCAL_NED_DATA {
30319    pub const ENCODED_LEN: usize = 53usize;
30320    pub const DEFAULT: Self = Self {
30321        time_boot_ms: 0_u32,
30322        x: 0.0_f32,
30323        y: 0.0_f32,
30324        z: 0.0_f32,
30325        vx: 0.0_f32,
30326        vy: 0.0_f32,
30327        vz: 0.0_f32,
30328        afx: 0.0_f32,
30329        afy: 0.0_f32,
30330        afz: 0.0_f32,
30331        yaw: 0.0_f32,
30332        yaw_rate: 0.0_f32,
30333        type_mask: PositionTargetTypemask::DEFAULT,
30334        target_system: 0_u8,
30335        target_component: 0_u8,
30336        coordinate_frame: MavFrame::DEFAULT,
30337    };
30338    #[cfg(feature = "arbitrary")]
30339    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30340        use arbitrary::{Arbitrary, Unstructured};
30341        let mut buf = [0u8; 1024];
30342        rng.fill_bytes(&mut buf);
30343        let mut unstructured = Unstructured::new(&buf);
30344        Self::arbitrary(&mut unstructured).unwrap_or_default()
30345    }
30346}
30347impl Default for SET_POSITION_TARGET_LOCAL_NED_DATA {
30348    fn default() -> Self {
30349        Self::DEFAULT.clone()
30350    }
30351}
30352impl MessageData for SET_POSITION_TARGET_LOCAL_NED_DATA {
30353    type Message = MavMessage;
30354    const ID: u32 = 84u32;
30355    const NAME: &'static str = "SET_POSITION_TARGET_LOCAL_NED";
30356    const EXTRA_CRC: u8 = 143u8;
30357    const ENCODED_LEN: usize = 53usize;
30358    fn deser(
30359        _version: MavlinkVersion,
30360        __input: &[u8],
30361    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30362        let avail_len = __input.len();
30363        let mut payload_buf = [0; Self::ENCODED_LEN];
30364        let mut buf = if avail_len < Self::ENCODED_LEN {
30365            payload_buf[0..avail_len].copy_from_slice(__input);
30366            Bytes::new(&payload_buf)
30367        } else {
30368            Bytes::new(__input)
30369        };
30370        let mut __struct = Self::default();
30371        __struct.time_boot_ms = buf.get_u32_le();
30372        __struct.x = buf.get_f32_le();
30373        __struct.y = buf.get_f32_le();
30374        __struct.z = buf.get_f32_le();
30375        __struct.vx = buf.get_f32_le();
30376        __struct.vy = buf.get_f32_le();
30377        __struct.vz = buf.get_f32_le();
30378        __struct.afx = buf.get_f32_le();
30379        __struct.afy = buf.get_f32_le();
30380        __struct.afz = buf.get_f32_le();
30381        __struct.yaw = buf.get_f32_le();
30382        __struct.yaw_rate = buf.get_f32_le();
30383        let tmp = buf.get_u16_le();
30384        __struct.type_mask = PositionTargetTypemask::from_bits(
30385            tmp & PositionTargetTypemask::all().bits(),
30386        )
30387        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
30388            flag_type: "PositionTargetTypemask",
30389            value: tmp as u32,
30390        })?;
30391        __struct.target_system = buf.get_u8();
30392        __struct.target_component = buf.get_u8();
30393        let tmp = buf.get_u8();
30394        __struct.coordinate_frame =
30395            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30396                enum_type: "MavFrame",
30397                value: tmp as u32,
30398            })?;
30399        Ok(__struct)
30400    }
30401    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30402        let mut __tmp = BytesMut::new(bytes);
30403        #[allow(clippy::absurd_extreme_comparisons)]
30404        #[allow(unused_comparisons)]
30405        if __tmp.remaining() < Self::ENCODED_LEN {
30406            panic!(
30407                "buffer is too small (need {} bytes, but got {})",
30408                Self::ENCODED_LEN,
30409                __tmp.remaining(),
30410            )
30411        }
30412        __tmp.put_u32_le(self.time_boot_ms);
30413        __tmp.put_f32_le(self.x);
30414        __tmp.put_f32_le(self.y);
30415        __tmp.put_f32_le(self.z);
30416        __tmp.put_f32_le(self.vx);
30417        __tmp.put_f32_le(self.vy);
30418        __tmp.put_f32_le(self.vz);
30419        __tmp.put_f32_le(self.afx);
30420        __tmp.put_f32_le(self.afy);
30421        __tmp.put_f32_le(self.afz);
30422        __tmp.put_f32_le(self.yaw);
30423        __tmp.put_f32_le(self.yaw_rate);
30424        __tmp.put_u16_le(self.type_mask.bits());
30425        __tmp.put_u8(self.target_system);
30426        __tmp.put_u8(self.target_component);
30427        __tmp.put_u8(self.coordinate_frame as u8);
30428        if matches!(version, MavlinkVersion::V2) {
30429            let len = __tmp.len();
30430            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30431        } else {
30432            __tmp.len()
30433        }
30434    }
30435}
30436#[doc = "Status of simulation environment, if used."]
30437#[doc = ""]
30438#[doc = "ID: 108"]
30439#[derive(Debug, Clone, PartialEq)]
30440#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30441#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30442#[cfg_attr(feature = "ts", derive(TS))]
30443#[cfg_attr(feature = "ts", ts(export))]
30444pub struct SIM_STATE_DATA {
30445    #[doc = "True attitude quaternion component 1, w (1 in null-rotation)"]
30446    pub q1: f32,
30447    #[doc = "True attitude quaternion component 2, x (0 in null-rotation)"]
30448    pub q2: f32,
30449    #[doc = "True attitude quaternion component 3, y (0 in null-rotation)"]
30450    pub q3: f32,
30451    #[doc = "True attitude quaternion component 4, z (0 in null-rotation)"]
30452    pub q4: f32,
30453    #[doc = "Attitude roll expressed as Euler angles, not recommended except for human-readable outputs"]
30454    pub roll: f32,
30455    #[doc = "Attitude pitch expressed as Euler angles, not recommended except for human-readable outputs"]
30456    pub pitch: f32,
30457    #[doc = "Attitude yaw expressed as Euler angles, not recommended except for human-readable outputs"]
30458    pub yaw: f32,
30459    #[doc = "X acceleration"]
30460    pub xacc: f32,
30461    #[doc = "Y acceleration"]
30462    pub yacc: f32,
30463    #[doc = "Z acceleration"]
30464    pub zacc: f32,
30465    #[doc = "Angular speed around X axis"]
30466    pub xgyro: f32,
30467    #[doc = "Angular speed around Y axis"]
30468    pub ygyro: f32,
30469    #[doc = "Angular speed around Z axis"]
30470    pub zgyro: f32,
30471    #[doc = "Latitude (lower precision). Both this and the lat_int field should be set."]
30472    pub lat: f32,
30473    #[doc = "Longitude (lower precision). Both this and the lon_int field should be set."]
30474    pub lon: f32,
30475    #[doc = "Altitude"]
30476    pub alt: f32,
30477    #[doc = "Horizontal position standard deviation"]
30478    pub std_dev_horz: f32,
30479    #[doc = "Vertical position standard deviation"]
30480    pub std_dev_vert: f32,
30481    #[doc = "True velocity in north direction in earth-fixed NED frame"]
30482    pub vn: f32,
30483    #[doc = "True velocity in east direction in earth-fixed NED frame"]
30484    pub ve: f32,
30485    #[doc = "True velocity in down direction in earth-fixed NED frame"]
30486    pub vd: f32,
30487    #[doc = "Latitude (higher precision). If 0, recipients should use the lat field value (otherwise this field is preferred)."]
30488    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30489    pub lat_int: i32,
30490    #[doc = "Longitude (higher precision). If 0, recipients should use the lon field value (otherwise this field is preferred)."]
30491    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30492    pub lon_int: i32,
30493}
30494impl SIM_STATE_DATA {
30495    pub const ENCODED_LEN: usize = 92usize;
30496    pub const DEFAULT: Self = Self {
30497        q1: 0.0_f32,
30498        q2: 0.0_f32,
30499        q3: 0.0_f32,
30500        q4: 0.0_f32,
30501        roll: 0.0_f32,
30502        pitch: 0.0_f32,
30503        yaw: 0.0_f32,
30504        xacc: 0.0_f32,
30505        yacc: 0.0_f32,
30506        zacc: 0.0_f32,
30507        xgyro: 0.0_f32,
30508        ygyro: 0.0_f32,
30509        zgyro: 0.0_f32,
30510        lat: 0.0_f32,
30511        lon: 0.0_f32,
30512        alt: 0.0_f32,
30513        std_dev_horz: 0.0_f32,
30514        std_dev_vert: 0.0_f32,
30515        vn: 0.0_f32,
30516        ve: 0.0_f32,
30517        vd: 0.0_f32,
30518        lat_int: 0_i32,
30519        lon_int: 0_i32,
30520    };
30521    #[cfg(feature = "arbitrary")]
30522    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30523        use arbitrary::{Arbitrary, Unstructured};
30524        let mut buf = [0u8; 1024];
30525        rng.fill_bytes(&mut buf);
30526        let mut unstructured = Unstructured::new(&buf);
30527        Self::arbitrary(&mut unstructured).unwrap_or_default()
30528    }
30529}
30530impl Default for SIM_STATE_DATA {
30531    fn default() -> Self {
30532        Self::DEFAULT.clone()
30533    }
30534}
30535impl MessageData for SIM_STATE_DATA {
30536    type Message = MavMessage;
30537    const ID: u32 = 108u32;
30538    const NAME: &'static str = "SIM_STATE";
30539    const EXTRA_CRC: u8 = 32u8;
30540    const ENCODED_LEN: usize = 92usize;
30541    fn deser(
30542        _version: MavlinkVersion,
30543        __input: &[u8],
30544    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30545        let avail_len = __input.len();
30546        let mut payload_buf = [0; Self::ENCODED_LEN];
30547        let mut buf = if avail_len < Self::ENCODED_LEN {
30548            payload_buf[0..avail_len].copy_from_slice(__input);
30549            Bytes::new(&payload_buf)
30550        } else {
30551            Bytes::new(__input)
30552        };
30553        let mut __struct = Self::default();
30554        __struct.q1 = buf.get_f32_le();
30555        __struct.q2 = buf.get_f32_le();
30556        __struct.q3 = buf.get_f32_le();
30557        __struct.q4 = buf.get_f32_le();
30558        __struct.roll = buf.get_f32_le();
30559        __struct.pitch = buf.get_f32_le();
30560        __struct.yaw = buf.get_f32_le();
30561        __struct.xacc = buf.get_f32_le();
30562        __struct.yacc = buf.get_f32_le();
30563        __struct.zacc = buf.get_f32_le();
30564        __struct.xgyro = buf.get_f32_le();
30565        __struct.ygyro = buf.get_f32_le();
30566        __struct.zgyro = buf.get_f32_le();
30567        __struct.lat = buf.get_f32_le();
30568        __struct.lon = buf.get_f32_le();
30569        __struct.alt = buf.get_f32_le();
30570        __struct.std_dev_horz = buf.get_f32_le();
30571        __struct.std_dev_vert = buf.get_f32_le();
30572        __struct.vn = buf.get_f32_le();
30573        __struct.ve = buf.get_f32_le();
30574        __struct.vd = buf.get_f32_le();
30575        __struct.lat_int = buf.get_i32_le();
30576        __struct.lon_int = buf.get_i32_le();
30577        Ok(__struct)
30578    }
30579    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30580        let mut __tmp = BytesMut::new(bytes);
30581        #[allow(clippy::absurd_extreme_comparisons)]
30582        #[allow(unused_comparisons)]
30583        if __tmp.remaining() < Self::ENCODED_LEN {
30584            panic!(
30585                "buffer is too small (need {} bytes, but got {})",
30586                Self::ENCODED_LEN,
30587                __tmp.remaining(),
30588            )
30589        }
30590        __tmp.put_f32_le(self.q1);
30591        __tmp.put_f32_le(self.q2);
30592        __tmp.put_f32_le(self.q3);
30593        __tmp.put_f32_le(self.q4);
30594        __tmp.put_f32_le(self.roll);
30595        __tmp.put_f32_le(self.pitch);
30596        __tmp.put_f32_le(self.yaw);
30597        __tmp.put_f32_le(self.xacc);
30598        __tmp.put_f32_le(self.yacc);
30599        __tmp.put_f32_le(self.zacc);
30600        __tmp.put_f32_le(self.xgyro);
30601        __tmp.put_f32_le(self.ygyro);
30602        __tmp.put_f32_le(self.zgyro);
30603        __tmp.put_f32_le(self.lat);
30604        __tmp.put_f32_le(self.lon);
30605        __tmp.put_f32_le(self.alt);
30606        __tmp.put_f32_le(self.std_dev_horz);
30607        __tmp.put_f32_le(self.std_dev_vert);
30608        __tmp.put_f32_le(self.vn);
30609        __tmp.put_f32_le(self.ve);
30610        __tmp.put_f32_le(self.vd);
30611        if matches!(version, MavlinkVersion::V2) {
30612            __tmp.put_i32_le(self.lat_int);
30613            __tmp.put_i32_le(self.lon_int);
30614            let len = __tmp.len();
30615            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30616        } else {
30617            __tmp.len()
30618        }
30619    }
30620}
30621#[deprecated = "The BATTERY_INFO message is better aligned with UAVCAN messages, and in any case is useful even if a battery is not \"smart\". See `BATTERY_INFO` (Deprecated since 2024-02)"]
30622#[doc = "Smart Battery information (static/infrequent update). Use for updates from: smart battery to flight stack, flight stack to GCS. Use BATTERY_STATUS for the frequent battery updates."]
30623#[doc = ""]
30624#[doc = "ID: 370"]
30625#[derive(Debug, Clone, PartialEq)]
30626#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30627#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30628#[cfg_attr(feature = "ts", derive(TS))]
30629#[cfg_attr(feature = "ts", ts(export))]
30630pub struct SMART_BATTERY_INFO_DATA {
30631    #[doc = "Capacity when full according to manufacturer, -1: field not provided."]
30632    pub capacity_full_specification: i32,
30633    #[doc = "Capacity when full (accounting for battery degradation), -1: field not provided."]
30634    pub capacity_full: i32,
30635    #[doc = "Charge/discharge cycle count. UINT16_MAX: field not provided."]
30636    pub cycle_count: u16,
30637    #[doc = "Battery weight. 0: field not provided."]
30638    pub weight: u16,
30639    #[doc = "Minimum per-cell voltage when discharging. If not supplied set to UINT16_MAX value."]
30640    pub discharge_minimum_voltage: u16,
30641    #[doc = "Minimum per-cell voltage when charging. If not supplied set to UINT16_MAX value."]
30642    pub charging_minimum_voltage: u16,
30643    #[doc = "Minimum per-cell voltage when resting. If not supplied set to UINT16_MAX value."]
30644    pub resting_minimum_voltage: u16,
30645    #[doc = "Battery ID"]
30646    pub id: u8,
30647    #[doc = "Function of the battery"]
30648    pub battery_function: MavBatteryFunction,
30649    #[doc = "Type (chemistry) of the battery"]
30650    pub mavtype: MavBatteryType,
30651    #[doc = "Serial number in ASCII characters, 0 terminated. All 0: field not provided."]
30652    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30653    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30654    pub serial_number: [u8; 16],
30655    #[doc = "Static device name in ASCII characters, 0 terminated. All 0: field not provided. Encode as manufacturer name then product name separated using an underscore."]
30656    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30657    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30658    pub device_name: [u8; 50],
30659    #[doc = "Maximum per-cell voltage when charged. 0: field not provided."]
30660    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30661    pub charging_maximum_voltage: u16,
30662    #[doc = "Number of battery cells in series. 0: field not provided."]
30663    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30664    pub cells_in_series: u8,
30665    #[doc = "Maximum pack discharge current. 0: field not provided."]
30666    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30667    pub discharge_maximum_current: u32,
30668    #[doc = "Maximum pack discharge burst current. 0: field not provided."]
30669    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30670    pub discharge_maximum_burst_current: u32,
30671    #[doc = "Manufacture date (DD/MM/YYYY) in ASCII characters, 0 terminated. All 0: field not provided."]
30672    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30673    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30674    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30675    pub manufacture_date: [u8; 11],
30676}
30677impl SMART_BATTERY_INFO_DATA {
30678    pub const ENCODED_LEN: usize = 109usize;
30679    pub const DEFAULT: Self = Self {
30680        capacity_full_specification: 0_i32,
30681        capacity_full: 0_i32,
30682        cycle_count: 0_u16,
30683        weight: 0_u16,
30684        discharge_minimum_voltage: 0_u16,
30685        charging_minimum_voltage: 0_u16,
30686        resting_minimum_voltage: 0_u16,
30687        id: 0_u8,
30688        battery_function: MavBatteryFunction::DEFAULT,
30689        mavtype: MavBatteryType::DEFAULT,
30690        serial_number: [0_u8; 16usize],
30691        device_name: [0_u8; 50usize],
30692        charging_maximum_voltage: 0_u16,
30693        cells_in_series: 0_u8,
30694        discharge_maximum_current: 0_u32,
30695        discharge_maximum_burst_current: 0_u32,
30696        manufacture_date: [0_u8; 11usize],
30697    };
30698    #[cfg(feature = "arbitrary")]
30699    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30700        use arbitrary::{Arbitrary, Unstructured};
30701        let mut buf = [0u8; 1024];
30702        rng.fill_bytes(&mut buf);
30703        let mut unstructured = Unstructured::new(&buf);
30704        Self::arbitrary(&mut unstructured).unwrap_or_default()
30705    }
30706}
30707impl Default for SMART_BATTERY_INFO_DATA {
30708    fn default() -> Self {
30709        Self::DEFAULT.clone()
30710    }
30711}
30712impl MessageData for SMART_BATTERY_INFO_DATA {
30713    type Message = MavMessage;
30714    const ID: u32 = 370u32;
30715    const NAME: &'static str = "SMART_BATTERY_INFO";
30716    const EXTRA_CRC: u8 = 75u8;
30717    const ENCODED_LEN: usize = 109usize;
30718    fn deser(
30719        _version: MavlinkVersion,
30720        __input: &[u8],
30721    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30722        let avail_len = __input.len();
30723        let mut payload_buf = [0; Self::ENCODED_LEN];
30724        let mut buf = if avail_len < Self::ENCODED_LEN {
30725            payload_buf[0..avail_len].copy_from_slice(__input);
30726            Bytes::new(&payload_buf)
30727        } else {
30728            Bytes::new(__input)
30729        };
30730        let mut __struct = Self::default();
30731        __struct.capacity_full_specification = buf.get_i32_le();
30732        __struct.capacity_full = buf.get_i32_le();
30733        __struct.cycle_count = buf.get_u16_le();
30734        __struct.weight = buf.get_u16_le();
30735        __struct.discharge_minimum_voltage = buf.get_u16_le();
30736        __struct.charging_minimum_voltage = buf.get_u16_le();
30737        __struct.resting_minimum_voltage = buf.get_u16_le();
30738        __struct.id = buf.get_u8();
30739        let tmp = buf.get_u8();
30740        __struct.battery_function =
30741            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30742                enum_type: "MavBatteryFunction",
30743                value: tmp as u32,
30744            })?;
30745        let tmp = buf.get_u8();
30746        __struct.mavtype =
30747            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30748                enum_type: "MavBatteryType",
30749                value: tmp as u32,
30750            })?;
30751        for v in &mut __struct.serial_number {
30752            let val = buf.get_u8();
30753            *v = val;
30754        }
30755        for v in &mut __struct.device_name {
30756            let val = buf.get_u8();
30757            *v = val;
30758        }
30759        __struct.charging_maximum_voltage = buf.get_u16_le();
30760        __struct.cells_in_series = buf.get_u8();
30761        __struct.discharge_maximum_current = buf.get_u32_le();
30762        __struct.discharge_maximum_burst_current = buf.get_u32_le();
30763        for v in &mut __struct.manufacture_date {
30764            let val = buf.get_u8();
30765            *v = val;
30766        }
30767        Ok(__struct)
30768    }
30769    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30770        let mut __tmp = BytesMut::new(bytes);
30771        #[allow(clippy::absurd_extreme_comparisons)]
30772        #[allow(unused_comparisons)]
30773        if __tmp.remaining() < Self::ENCODED_LEN {
30774            panic!(
30775                "buffer is too small (need {} bytes, but got {})",
30776                Self::ENCODED_LEN,
30777                __tmp.remaining(),
30778            )
30779        }
30780        __tmp.put_i32_le(self.capacity_full_specification);
30781        __tmp.put_i32_le(self.capacity_full);
30782        __tmp.put_u16_le(self.cycle_count);
30783        __tmp.put_u16_le(self.weight);
30784        __tmp.put_u16_le(self.discharge_minimum_voltage);
30785        __tmp.put_u16_le(self.charging_minimum_voltage);
30786        __tmp.put_u16_le(self.resting_minimum_voltage);
30787        __tmp.put_u8(self.id);
30788        __tmp.put_u8(self.battery_function as u8);
30789        __tmp.put_u8(self.mavtype as u8);
30790        for val in &self.serial_number {
30791            __tmp.put_u8(*val);
30792        }
30793        for val in &self.device_name {
30794            __tmp.put_u8(*val);
30795        }
30796        if matches!(version, MavlinkVersion::V2) {
30797            __tmp.put_u16_le(self.charging_maximum_voltage);
30798            __tmp.put_u8(self.cells_in_series);
30799            __tmp.put_u32_le(self.discharge_maximum_current);
30800            __tmp.put_u32_le(self.discharge_maximum_burst_current);
30801            for val in &self.manufacture_date {
30802                __tmp.put_u8(*val);
30803            }
30804            let len = __tmp.len();
30805            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30806        } else {
30807            __tmp.len()
30808        }
30809    }
30810}
30811#[doc = "Status text message. These messages are printed in yellow in the COMM console of QGroundControl. WARNING: They consume quite some bandwidth, so use only for important status and error messages. If implemented wisely, these messages are buffered on the MCU and sent only at a limited rate (e.g. 10 Hz)."]
30812#[doc = ""]
30813#[doc = "ID: 253"]
30814#[derive(Debug, Clone, PartialEq)]
30815#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30816#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30817#[cfg_attr(feature = "ts", derive(TS))]
30818#[cfg_attr(feature = "ts", ts(export))]
30819pub struct STATUSTEXT_DATA {
30820    #[doc = "Severity of status. Relies on the definitions within RFC-5424."]
30821    pub severity: MavSeverity,
30822    #[doc = "Status text message, without null termination character"]
30823    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30824    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30825    pub text: [u8; 50],
30826    #[doc = "Unique (opaque) identifier for this statustext message.  May be used to reassemble a logical long-statustext message from a sequence of chunks.  A value of zero indicates this is the only chunk in the sequence and the message can be emitted immediately."]
30827    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30828    pub id: u16,
30829    #[doc = "This chunk's sequence number; indexing is from zero.  Any null character in the text field is taken to mean this was the last chunk."]
30830    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30831    pub chunk_seq: u8,
30832}
30833impl STATUSTEXT_DATA {
30834    pub const ENCODED_LEN: usize = 54usize;
30835    pub const DEFAULT: Self = Self {
30836        severity: MavSeverity::DEFAULT,
30837        text: [0_u8; 50usize],
30838        id: 0_u16,
30839        chunk_seq: 0_u8,
30840    };
30841    #[cfg(feature = "arbitrary")]
30842    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30843        use arbitrary::{Arbitrary, Unstructured};
30844        let mut buf = [0u8; 1024];
30845        rng.fill_bytes(&mut buf);
30846        let mut unstructured = Unstructured::new(&buf);
30847        Self::arbitrary(&mut unstructured).unwrap_or_default()
30848    }
30849}
30850impl Default for STATUSTEXT_DATA {
30851    fn default() -> Self {
30852        Self::DEFAULT.clone()
30853    }
30854}
30855impl MessageData for STATUSTEXT_DATA {
30856    type Message = MavMessage;
30857    const ID: u32 = 253u32;
30858    const NAME: &'static str = "STATUSTEXT";
30859    const EXTRA_CRC: u8 = 83u8;
30860    const ENCODED_LEN: usize = 54usize;
30861    fn deser(
30862        _version: MavlinkVersion,
30863        __input: &[u8],
30864    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30865        let avail_len = __input.len();
30866        let mut payload_buf = [0; Self::ENCODED_LEN];
30867        let mut buf = if avail_len < Self::ENCODED_LEN {
30868            payload_buf[0..avail_len].copy_from_slice(__input);
30869            Bytes::new(&payload_buf)
30870        } else {
30871            Bytes::new(__input)
30872        };
30873        let mut __struct = Self::default();
30874        let tmp = buf.get_u8();
30875        __struct.severity =
30876            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30877                enum_type: "MavSeverity",
30878                value: tmp as u32,
30879            })?;
30880        for v in &mut __struct.text {
30881            let val = buf.get_u8();
30882            *v = val;
30883        }
30884        __struct.id = buf.get_u16_le();
30885        __struct.chunk_seq = buf.get_u8();
30886        Ok(__struct)
30887    }
30888    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30889        let mut __tmp = BytesMut::new(bytes);
30890        #[allow(clippy::absurd_extreme_comparisons)]
30891        #[allow(unused_comparisons)]
30892        if __tmp.remaining() < Self::ENCODED_LEN {
30893            panic!(
30894                "buffer is too small (need {} bytes, but got {})",
30895                Self::ENCODED_LEN,
30896                __tmp.remaining(),
30897            )
30898        }
30899        __tmp.put_u8(self.severity as u8);
30900        for val in &self.text {
30901            __tmp.put_u8(*val);
30902        }
30903        if matches!(version, MavlinkVersion::V2) {
30904            __tmp.put_u16_le(self.id);
30905            __tmp.put_u8(self.chunk_seq);
30906            let len = __tmp.len();
30907            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30908        } else {
30909            __tmp.len()
30910        }
30911    }
30912}
30913#[doc = "Information about a storage medium. This message is sent in response to a request with MAV_CMD_REQUEST_MESSAGE and whenever the status of the storage changes (STORAGE_STATUS). Use MAV_CMD_REQUEST_MESSAGE.param2 to indicate the index/id of requested storage: 0 for all, 1 for first, 2 for second, etc."]
30914#[doc = ""]
30915#[doc = "ID: 261"]
30916#[derive(Debug, Clone, PartialEq)]
30917#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30918#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30919#[cfg_attr(feature = "ts", derive(TS))]
30920#[cfg_attr(feature = "ts", ts(export))]
30921pub struct STORAGE_INFORMATION_DATA {
30922    #[doc = "Timestamp (time since system boot)."]
30923    pub time_boot_ms: u32,
30924    #[doc = "Total capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
30925    pub total_capacity: f32,
30926    #[doc = "Used capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
30927    pub used_capacity: f32,
30928    #[doc = "Available storage capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
30929    pub available_capacity: f32,
30930    #[doc = "Read speed."]
30931    pub read_speed: f32,
30932    #[doc = "Write speed."]
30933    pub write_speed: f32,
30934    #[doc = "Storage ID (1 for first, 2 for second, etc.)"]
30935    pub storage_id: u8,
30936    #[doc = "Number of storage devices"]
30937    pub storage_count: u8,
30938    #[doc = "Status of storage"]
30939    pub status: StorageStatus,
30940    #[doc = "Type of storage"]
30941    #[cfg_attr(feature = "serde", serde(default))]
30942    pub mavtype: StorageType,
30943    #[doc = "Textual storage name to be used in UI (microSD 1, Internal Memory, etc.) This is a NULL terminated string. If it is exactly 32 characters long, add a terminating NULL. If this string is empty, the generic type is shown to the user."]
30944    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30945    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30946    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30947    pub name: [u8; 32],
30948    #[doc = "Flags indicating whether this instance is preferred storage for photos, videos, etc.         Note: Implementations should initially set the flags on the system-default storage id used for saving media (if possible/supported).         This setting can then be overridden using MAV_CMD_SET_STORAGE_USAGE.         If the media usage flags are not set, a GCS may assume storage ID 1 is the default storage for all media types."]
30949    #[cfg_attr(feature = "serde", serde(default))]
30950    pub storage_usage: StorageUsageFlag,
30951}
30952impl STORAGE_INFORMATION_DATA {
30953    pub const ENCODED_LEN: usize = 61usize;
30954    pub const DEFAULT: Self = Self {
30955        time_boot_ms: 0_u32,
30956        total_capacity: 0.0_f32,
30957        used_capacity: 0.0_f32,
30958        available_capacity: 0.0_f32,
30959        read_speed: 0.0_f32,
30960        write_speed: 0.0_f32,
30961        storage_id: 0_u8,
30962        storage_count: 0_u8,
30963        status: StorageStatus::DEFAULT,
30964        mavtype: StorageType::DEFAULT,
30965        name: [0_u8; 32usize],
30966        storage_usage: StorageUsageFlag::DEFAULT,
30967    };
30968    #[cfg(feature = "arbitrary")]
30969    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30970        use arbitrary::{Arbitrary, Unstructured};
30971        let mut buf = [0u8; 1024];
30972        rng.fill_bytes(&mut buf);
30973        let mut unstructured = Unstructured::new(&buf);
30974        Self::arbitrary(&mut unstructured).unwrap_or_default()
30975    }
30976}
30977impl Default for STORAGE_INFORMATION_DATA {
30978    fn default() -> Self {
30979        Self::DEFAULT.clone()
30980    }
30981}
30982impl MessageData for STORAGE_INFORMATION_DATA {
30983    type Message = MavMessage;
30984    const ID: u32 = 261u32;
30985    const NAME: &'static str = "STORAGE_INFORMATION";
30986    const EXTRA_CRC: u8 = 179u8;
30987    const ENCODED_LEN: usize = 61usize;
30988    fn deser(
30989        _version: MavlinkVersion,
30990        __input: &[u8],
30991    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30992        let avail_len = __input.len();
30993        let mut payload_buf = [0; Self::ENCODED_LEN];
30994        let mut buf = if avail_len < Self::ENCODED_LEN {
30995            payload_buf[0..avail_len].copy_from_slice(__input);
30996            Bytes::new(&payload_buf)
30997        } else {
30998            Bytes::new(__input)
30999        };
31000        let mut __struct = Self::default();
31001        __struct.time_boot_ms = buf.get_u32_le();
31002        __struct.total_capacity = buf.get_f32_le();
31003        __struct.used_capacity = buf.get_f32_le();
31004        __struct.available_capacity = buf.get_f32_le();
31005        __struct.read_speed = buf.get_f32_le();
31006        __struct.write_speed = buf.get_f32_le();
31007        __struct.storage_id = buf.get_u8();
31008        __struct.storage_count = buf.get_u8();
31009        let tmp = buf.get_u8();
31010        __struct.status =
31011            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31012                enum_type: "StorageStatus",
31013                value: tmp as u32,
31014            })?;
31015        let tmp = buf.get_u8();
31016        __struct.mavtype =
31017            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31018                enum_type: "StorageType",
31019                value: tmp as u32,
31020            })?;
31021        for v in &mut __struct.name {
31022            let val = buf.get_u8();
31023            *v = val;
31024        }
31025        let tmp = buf.get_u8();
31026        __struct.storage_usage = StorageUsageFlag::from_bits(tmp & StorageUsageFlag::all().bits())
31027            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31028                flag_type: "StorageUsageFlag",
31029                value: tmp as u32,
31030            })?;
31031        Ok(__struct)
31032    }
31033    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31034        let mut __tmp = BytesMut::new(bytes);
31035        #[allow(clippy::absurd_extreme_comparisons)]
31036        #[allow(unused_comparisons)]
31037        if __tmp.remaining() < Self::ENCODED_LEN {
31038            panic!(
31039                "buffer is too small (need {} bytes, but got {})",
31040                Self::ENCODED_LEN,
31041                __tmp.remaining(),
31042            )
31043        }
31044        __tmp.put_u32_le(self.time_boot_ms);
31045        __tmp.put_f32_le(self.total_capacity);
31046        __tmp.put_f32_le(self.used_capacity);
31047        __tmp.put_f32_le(self.available_capacity);
31048        __tmp.put_f32_le(self.read_speed);
31049        __tmp.put_f32_le(self.write_speed);
31050        __tmp.put_u8(self.storage_id);
31051        __tmp.put_u8(self.storage_count);
31052        __tmp.put_u8(self.status as u8);
31053        if matches!(version, MavlinkVersion::V2) {
31054            __tmp.put_u8(self.mavtype as u8);
31055            for val in &self.name {
31056                __tmp.put_u8(*val);
31057            }
31058            __tmp.put_u8(self.storage_usage.bits());
31059            let len = __tmp.len();
31060            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31061        } else {
31062            __tmp.len()
31063        }
31064    }
31065}
31066#[doc = "Tune formats supported by vehicle. This should be emitted as response to MAV_CMD_REQUEST_MESSAGE."]
31067#[doc = ""]
31068#[doc = "ID: 401"]
31069#[derive(Debug, Clone, PartialEq)]
31070#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31071#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31072#[cfg_attr(feature = "ts", derive(TS))]
31073#[cfg_attr(feature = "ts", ts(export))]
31074pub struct SUPPORTED_TUNES_DATA {
31075    #[doc = "Bitfield of supported tune formats."]
31076    pub format: TuneFormat,
31077    #[doc = "System ID"]
31078    pub target_system: u8,
31079    #[doc = "Component ID"]
31080    pub target_component: u8,
31081}
31082impl SUPPORTED_TUNES_DATA {
31083    pub const ENCODED_LEN: usize = 6usize;
31084    pub const DEFAULT: Self = Self {
31085        format: TuneFormat::DEFAULT,
31086        target_system: 0_u8,
31087        target_component: 0_u8,
31088    };
31089    #[cfg(feature = "arbitrary")]
31090    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31091        use arbitrary::{Arbitrary, Unstructured};
31092        let mut buf = [0u8; 1024];
31093        rng.fill_bytes(&mut buf);
31094        let mut unstructured = Unstructured::new(&buf);
31095        Self::arbitrary(&mut unstructured).unwrap_or_default()
31096    }
31097}
31098impl Default for SUPPORTED_TUNES_DATA {
31099    fn default() -> Self {
31100        Self::DEFAULT.clone()
31101    }
31102}
31103impl MessageData for SUPPORTED_TUNES_DATA {
31104    type Message = MavMessage;
31105    const ID: u32 = 401u32;
31106    const NAME: &'static str = "SUPPORTED_TUNES";
31107    const EXTRA_CRC: u8 = 183u8;
31108    const ENCODED_LEN: usize = 6usize;
31109    fn deser(
31110        _version: MavlinkVersion,
31111        __input: &[u8],
31112    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31113        let avail_len = __input.len();
31114        let mut payload_buf = [0; Self::ENCODED_LEN];
31115        let mut buf = if avail_len < Self::ENCODED_LEN {
31116            payload_buf[0..avail_len].copy_from_slice(__input);
31117            Bytes::new(&payload_buf)
31118        } else {
31119            Bytes::new(__input)
31120        };
31121        let mut __struct = Self::default();
31122        let tmp = buf.get_u32_le();
31123        __struct.format = FromPrimitive::from_u32(tmp).ok_or(
31124            ::mavlink_core::error::ParserError::InvalidEnum {
31125                enum_type: "TuneFormat",
31126                value: tmp as u32,
31127            },
31128        )?;
31129        __struct.target_system = buf.get_u8();
31130        __struct.target_component = buf.get_u8();
31131        Ok(__struct)
31132    }
31133    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31134        let mut __tmp = BytesMut::new(bytes);
31135        #[allow(clippy::absurd_extreme_comparisons)]
31136        #[allow(unused_comparisons)]
31137        if __tmp.remaining() < Self::ENCODED_LEN {
31138            panic!(
31139                "buffer is too small (need {} bytes, but got {})",
31140                Self::ENCODED_LEN,
31141                __tmp.remaining(),
31142            )
31143        }
31144        __tmp.put_u32_le(self.format as u32);
31145        __tmp.put_u8(self.target_system);
31146        __tmp.put_u8(self.target_component);
31147        if matches!(version, MavlinkVersion::V2) {
31148            let len = __tmp.len();
31149            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31150        } else {
31151            __tmp.len()
31152        }
31153    }
31154}
31155#[doc = "The system time is the time of the master clock.         This can be emitted by flight controllers, onboard computers, or other components in the MAVLink network.         Components that are using a less reliable time source, such as a battery-backed real time clock, can choose to match their system clock to that of a SYSTEM_TYPE that indicates a more recent time.         This allows more broadly accurate date stamping of logs, and so on.         If precise time synchronization is needed then use TIMESYNC instead."]
31156#[doc = ""]
31157#[doc = "ID: 2"]
31158#[derive(Debug, Clone, PartialEq)]
31159#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31160#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31161#[cfg_attr(feature = "ts", derive(TS))]
31162#[cfg_attr(feature = "ts", ts(export))]
31163pub struct SYSTEM_TIME_DATA {
31164    #[doc = "Timestamp (UNIX epoch time)."]
31165    pub time_unix_usec: u64,
31166    #[doc = "Timestamp (time since system boot)."]
31167    pub time_boot_ms: u32,
31168}
31169impl SYSTEM_TIME_DATA {
31170    pub const ENCODED_LEN: usize = 12usize;
31171    pub const DEFAULT: Self = Self {
31172        time_unix_usec: 0_u64,
31173        time_boot_ms: 0_u32,
31174    };
31175    #[cfg(feature = "arbitrary")]
31176    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31177        use arbitrary::{Arbitrary, Unstructured};
31178        let mut buf = [0u8; 1024];
31179        rng.fill_bytes(&mut buf);
31180        let mut unstructured = Unstructured::new(&buf);
31181        Self::arbitrary(&mut unstructured).unwrap_or_default()
31182    }
31183}
31184impl Default for SYSTEM_TIME_DATA {
31185    fn default() -> Self {
31186        Self::DEFAULT.clone()
31187    }
31188}
31189impl MessageData for SYSTEM_TIME_DATA {
31190    type Message = MavMessage;
31191    const ID: u32 = 2u32;
31192    const NAME: &'static str = "SYSTEM_TIME";
31193    const EXTRA_CRC: u8 = 137u8;
31194    const ENCODED_LEN: usize = 12usize;
31195    fn deser(
31196        _version: MavlinkVersion,
31197        __input: &[u8],
31198    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31199        let avail_len = __input.len();
31200        let mut payload_buf = [0; Self::ENCODED_LEN];
31201        let mut buf = if avail_len < Self::ENCODED_LEN {
31202            payload_buf[0..avail_len].copy_from_slice(__input);
31203            Bytes::new(&payload_buf)
31204        } else {
31205            Bytes::new(__input)
31206        };
31207        let mut __struct = Self::default();
31208        __struct.time_unix_usec = buf.get_u64_le();
31209        __struct.time_boot_ms = buf.get_u32_le();
31210        Ok(__struct)
31211    }
31212    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31213        let mut __tmp = BytesMut::new(bytes);
31214        #[allow(clippy::absurd_extreme_comparisons)]
31215        #[allow(unused_comparisons)]
31216        if __tmp.remaining() < Self::ENCODED_LEN {
31217            panic!(
31218                "buffer is too small (need {} bytes, but got {})",
31219                Self::ENCODED_LEN,
31220                __tmp.remaining(),
31221            )
31222        }
31223        __tmp.put_u64_le(self.time_unix_usec);
31224        __tmp.put_u32_le(self.time_boot_ms);
31225        if matches!(version, MavlinkVersion::V2) {
31226            let len = __tmp.len();
31227            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31228        } else {
31229            __tmp.len()
31230        }
31231    }
31232}
31233#[doc = "The general system state. If the system is following the MAVLink standard, the system state is mainly defined by three orthogonal states/modes: The system mode, which is either LOCKED (motors shut down and locked), MANUAL (system under RC control), GUIDED (system with autonomous position control, position setpoint controlled manually) or AUTO (system guided by path/waypoint planner). The NAV_MODE defined the current flight state: LIFTOFF (often an open-loop maneuver), LANDING, WAYPOINTS or VECTOR. This represents the internal navigation state machine. The system status shows whether the system is currently active or not and if an emergency occurred. During the CRITICAL and EMERGENCY states the MAV is still considered to be active, but should start emergency procedures autonomously. After a failure occurred it should first move from active to critical to allow manual intervention and then move to emergency after a certain timeout."]
31234#[doc = ""]
31235#[doc = "ID: 1"]
31236#[derive(Debug, Clone, PartialEq)]
31237#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31238#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31239#[cfg_attr(feature = "ts", derive(TS))]
31240#[cfg_attr(feature = "ts", ts(export))]
31241pub struct SYS_STATUS_DATA {
31242    #[doc = "Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present."]
31243    pub onboard_control_sensors_present: MavSysStatusSensor,
31244    #[doc = "Bitmap showing which onboard controllers and sensors are enabled:  Value of 0: not enabled. Value of 1: enabled."]
31245    pub onboard_control_sensors_enabled: MavSysStatusSensor,
31246    #[doc = "Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy."]
31247    pub onboard_control_sensors_health: MavSysStatusSensor,
31248    #[doc = "Maximum usage in percent of the mainloop time. Values: [0-1000] - should always be below 1000"]
31249    pub load: u16,
31250    #[doc = "Battery voltage, UINT16_MAX: Voltage not sent by autopilot"]
31251    pub voltage_battery: u16,
31252    #[doc = "Battery current, -1: Current not sent by autopilot"]
31253    pub current_battery: i16,
31254    #[doc = "Communication drop rate, (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)"]
31255    pub drop_rate_comm: u16,
31256    #[doc = "Communication errors (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)"]
31257    pub errors_comm: u16,
31258    #[doc = "Autopilot-specific errors"]
31259    pub errors_count1: u16,
31260    #[doc = "Autopilot-specific errors"]
31261    pub errors_count2: u16,
31262    #[doc = "Autopilot-specific errors"]
31263    pub errors_count3: u16,
31264    #[doc = "Autopilot-specific errors"]
31265    pub errors_count4: u16,
31266    #[doc = "Battery energy remaining, -1: Battery remaining energy not sent by autopilot"]
31267    pub battery_remaining: i8,
31268    #[doc = "Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present."]
31269    #[cfg_attr(feature = "serde", serde(default))]
31270    pub onboard_control_sensors_present_extended: MavSysStatusSensorExtended,
31271    #[doc = "Bitmap showing which onboard controllers and sensors are enabled:  Value of 0: not enabled. Value of 1: enabled."]
31272    #[cfg_attr(feature = "serde", serde(default))]
31273    pub onboard_control_sensors_enabled_extended: MavSysStatusSensorExtended,
31274    #[doc = "Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy."]
31275    #[cfg_attr(feature = "serde", serde(default))]
31276    pub onboard_control_sensors_health_extended: MavSysStatusSensorExtended,
31277}
31278impl SYS_STATUS_DATA {
31279    pub const ENCODED_LEN: usize = 43usize;
31280    pub const DEFAULT: Self = Self {
31281        onboard_control_sensors_present: MavSysStatusSensor::DEFAULT,
31282        onboard_control_sensors_enabled: MavSysStatusSensor::DEFAULT,
31283        onboard_control_sensors_health: MavSysStatusSensor::DEFAULT,
31284        load: 0_u16,
31285        voltage_battery: 0_u16,
31286        current_battery: 0_i16,
31287        drop_rate_comm: 0_u16,
31288        errors_comm: 0_u16,
31289        errors_count1: 0_u16,
31290        errors_count2: 0_u16,
31291        errors_count3: 0_u16,
31292        errors_count4: 0_u16,
31293        battery_remaining: 0_i8,
31294        onboard_control_sensors_present_extended: MavSysStatusSensorExtended::DEFAULT,
31295        onboard_control_sensors_enabled_extended: MavSysStatusSensorExtended::DEFAULT,
31296        onboard_control_sensors_health_extended: MavSysStatusSensorExtended::DEFAULT,
31297    };
31298    #[cfg(feature = "arbitrary")]
31299    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31300        use arbitrary::{Arbitrary, Unstructured};
31301        let mut buf = [0u8; 1024];
31302        rng.fill_bytes(&mut buf);
31303        let mut unstructured = Unstructured::new(&buf);
31304        Self::arbitrary(&mut unstructured).unwrap_or_default()
31305    }
31306}
31307impl Default for SYS_STATUS_DATA {
31308    fn default() -> Self {
31309        Self::DEFAULT.clone()
31310    }
31311}
31312impl MessageData for SYS_STATUS_DATA {
31313    type Message = MavMessage;
31314    const ID: u32 = 1u32;
31315    const NAME: &'static str = "SYS_STATUS";
31316    const EXTRA_CRC: u8 = 124u8;
31317    const ENCODED_LEN: usize = 43usize;
31318    fn deser(
31319        _version: MavlinkVersion,
31320        __input: &[u8],
31321    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31322        let avail_len = __input.len();
31323        let mut payload_buf = [0; Self::ENCODED_LEN];
31324        let mut buf = if avail_len < Self::ENCODED_LEN {
31325            payload_buf[0..avail_len].copy_from_slice(__input);
31326            Bytes::new(&payload_buf)
31327        } else {
31328            Bytes::new(__input)
31329        };
31330        let mut __struct = Self::default();
31331        let tmp = buf.get_u32_le();
31332        __struct.onboard_control_sensors_present = MavSysStatusSensor::from_bits(
31333            tmp & MavSysStatusSensor::all().bits(),
31334        )
31335        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31336            flag_type: "MavSysStatusSensor",
31337            value: tmp as u32,
31338        })?;
31339        let tmp = buf.get_u32_le();
31340        __struct.onboard_control_sensors_enabled = MavSysStatusSensor::from_bits(
31341            tmp & MavSysStatusSensor::all().bits(),
31342        )
31343        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31344            flag_type: "MavSysStatusSensor",
31345            value: tmp as u32,
31346        })?;
31347        let tmp = buf.get_u32_le();
31348        __struct.onboard_control_sensors_health = MavSysStatusSensor::from_bits(
31349            tmp & MavSysStatusSensor::all().bits(),
31350        )
31351        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31352            flag_type: "MavSysStatusSensor",
31353            value: tmp as u32,
31354        })?;
31355        __struct.load = buf.get_u16_le();
31356        __struct.voltage_battery = buf.get_u16_le();
31357        __struct.current_battery = buf.get_i16_le();
31358        __struct.drop_rate_comm = buf.get_u16_le();
31359        __struct.errors_comm = buf.get_u16_le();
31360        __struct.errors_count1 = buf.get_u16_le();
31361        __struct.errors_count2 = buf.get_u16_le();
31362        __struct.errors_count3 = buf.get_u16_le();
31363        __struct.errors_count4 = buf.get_u16_le();
31364        __struct.battery_remaining = buf.get_i8();
31365        let tmp = buf.get_u32_le();
31366        __struct.onboard_control_sensors_present_extended =
31367            MavSysStatusSensorExtended::from_bits(tmp & MavSysStatusSensorExtended::all().bits())
31368                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31369                flag_type: "MavSysStatusSensorExtended",
31370                value: tmp as u32,
31371            })?;
31372        let tmp = buf.get_u32_le();
31373        __struct.onboard_control_sensors_enabled_extended =
31374            MavSysStatusSensorExtended::from_bits(tmp & MavSysStatusSensorExtended::all().bits())
31375                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31376                flag_type: "MavSysStatusSensorExtended",
31377                value: tmp as u32,
31378            })?;
31379        let tmp = buf.get_u32_le();
31380        __struct.onboard_control_sensors_health_extended =
31381            MavSysStatusSensorExtended::from_bits(tmp & MavSysStatusSensorExtended::all().bits())
31382                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31383                flag_type: "MavSysStatusSensorExtended",
31384                value: tmp as u32,
31385            })?;
31386        Ok(__struct)
31387    }
31388    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31389        let mut __tmp = BytesMut::new(bytes);
31390        #[allow(clippy::absurd_extreme_comparisons)]
31391        #[allow(unused_comparisons)]
31392        if __tmp.remaining() < Self::ENCODED_LEN {
31393            panic!(
31394                "buffer is too small (need {} bytes, but got {})",
31395                Self::ENCODED_LEN,
31396                __tmp.remaining(),
31397            )
31398        }
31399        __tmp.put_u32_le(self.onboard_control_sensors_present.bits());
31400        __tmp.put_u32_le(self.onboard_control_sensors_enabled.bits());
31401        __tmp.put_u32_le(self.onboard_control_sensors_health.bits());
31402        __tmp.put_u16_le(self.load);
31403        __tmp.put_u16_le(self.voltage_battery);
31404        __tmp.put_i16_le(self.current_battery);
31405        __tmp.put_u16_le(self.drop_rate_comm);
31406        __tmp.put_u16_le(self.errors_comm);
31407        __tmp.put_u16_le(self.errors_count1);
31408        __tmp.put_u16_le(self.errors_count2);
31409        __tmp.put_u16_le(self.errors_count3);
31410        __tmp.put_u16_le(self.errors_count4);
31411        __tmp.put_i8(self.battery_remaining);
31412        if matches!(version, MavlinkVersion::V2) {
31413            __tmp.put_u32_le(self.onboard_control_sensors_present_extended.bits());
31414            __tmp.put_u32_le(self.onboard_control_sensors_enabled_extended.bits());
31415            __tmp.put_u32_le(self.onboard_control_sensors_health_extended.bits());
31416            let len = __tmp.len();
31417            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31418        } else {
31419            __tmp.len()
31420        }
31421    }
31422}
31423#[doc = "Request that the vehicle report terrain height at the given location (expected response is a TERRAIN_REPORT). Used by GCS to check if vehicle has all terrain data needed for a mission."]
31424#[doc = ""]
31425#[doc = "ID: 135"]
31426#[derive(Debug, Clone, PartialEq)]
31427#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31428#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31429#[cfg_attr(feature = "ts", derive(TS))]
31430#[cfg_attr(feature = "ts", ts(export))]
31431pub struct TERRAIN_CHECK_DATA {
31432    #[doc = "Latitude"]
31433    pub lat: i32,
31434    #[doc = "Longitude"]
31435    pub lon: i32,
31436}
31437impl TERRAIN_CHECK_DATA {
31438    pub const ENCODED_LEN: usize = 8usize;
31439    pub const DEFAULT: Self = Self {
31440        lat: 0_i32,
31441        lon: 0_i32,
31442    };
31443    #[cfg(feature = "arbitrary")]
31444    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31445        use arbitrary::{Arbitrary, Unstructured};
31446        let mut buf = [0u8; 1024];
31447        rng.fill_bytes(&mut buf);
31448        let mut unstructured = Unstructured::new(&buf);
31449        Self::arbitrary(&mut unstructured).unwrap_or_default()
31450    }
31451}
31452impl Default for TERRAIN_CHECK_DATA {
31453    fn default() -> Self {
31454        Self::DEFAULT.clone()
31455    }
31456}
31457impl MessageData for TERRAIN_CHECK_DATA {
31458    type Message = MavMessage;
31459    const ID: u32 = 135u32;
31460    const NAME: &'static str = "TERRAIN_CHECK";
31461    const EXTRA_CRC: u8 = 203u8;
31462    const ENCODED_LEN: usize = 8usize;
31463    fn deser(
31464        _version: MavlinkVersion,
31465        __input: &[u8],
31466    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31467        let avail_len = __input.len();
31468        let mut payload_buf = [0; Self::ENCODED_LEN];
31469        let mut buf = if avail_len < Self::ENCODED_LEN {
31470            payload_buf[0..avail_len].copy_from_slice(__input);
31471            Bytes::new(&payload_buf)
31472        } else {
31473            Bytes::new(__input)
31474        };
31475        let mut __struct = Self::default();
31476        __struct.lat = buf.get_i32_le();
31477        __struct.lon = buf.get_i32_le();
31478        Ok(__struct)
31479    }
31480    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31481        let mut __tmp = BytesMut::new(bytes);
31482        #[allow(clippy::absurd_extreme_comparisons)]
31483        #[allow(unused_comparisons)]
31484        if __tmp.remaining() < Self::ENCODED_LEN {
31485            panic!(
31486                "buffer is too small (need {} bytes, but got {})",
31487                Self::ENCODED_LEN,
31488                __tmp.remaining(),
31489            )
31490        }
31491        __tmp.put_i32_le(self.lat);
31492        __tmp.put_i32_le(self.lon);
31493        if matches!(version, MavlinkVersion::V2) {
31494            let len = __tmp.len();
31495            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31496        } else {
31497            __tmp.len()
31498        }
31499    }
31500}
31501#[doc = "Terrain data sent from GCS. The lat/lon and grid_spacing must be the same as a lat/lon from a TERRAIN_REQUEST. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
31502#[doc = ""]
31503#[doc = "ID: 134"]
31504#[derive(Debug, Clone, PartialEq)]
31505#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31506#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31507#[cfg_attr(feature = "ts", derive(TS))]
31508#[cfg_attr(feature = "ts", ts(export))]
31509pub struct TERRAIN_DATA_DATA {
31510    #[doc = "Latitude of SW corner of first grid"]
31511    pub lat: i32,
31512    #[doc = "Longitude of SW corner of first grid"]
31513    pub lon: i32,
31514    #[doc = "Grid spacing"]
31515    pub grid_spacing: u16,
31516    #[doc = "Terrain data MSL"]
31517    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31518    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31519    pub data: [i16; 16],
31520    #[doc = "bit within the terrain request mask"]
31521    pub gridbit: u8,
31522}
31523impl TERRAIN_DATA_DATA {
31524    pub const ENCODED_LEN: usize = 43usize;
31525    pub const DEFAULT: Self = Self {
31526        lat: 0_i32,
31527        lon: 0_i32,
31528        grid_spacing: 0_u16,
31529        data: [0_i16; 16usize],
31530        gridbit: 0_u8,
31531    };
31532    #[cfg(feature = "arbitrary")]
31533    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31534        use arbitrary::{Arbitrary, Unstructured};
31535        let mut buf = [0u8; 1024];
31536        rng.fill_bytes(&mut buf);
31537        let mut unstructured = Unstructured::new(&buf);
31538        Self::arbitrary(&mut unstructured).unwrap_or_default()
31539    }
31540}
31541impl Default for TERRAIN_DATA_DATA {
31542    fn default() -> Self {
31543        Self::DEFAULT.clone()
31544    }
31545}
31546impl MessageData for TERRAIN_DATA_DATA {
31547    type Message = MavMessage;
31548    const ID: u32 = 134u32;
31549    const NAME: &'static str = "TERRAIN_DATA";
31550    const EXTRA_CRC: u8 = 229u8;
31551    const ENCODED_LEN: usize = 43usize;
31552    fn deser(
31553        _version: MavlinkVersion,
31554        __input: &[u8],
31555    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31556        let avail_len = __input.len();
31557        let mut payload_buf = [0; Self::ENCODED_LEN];
31558        let mut buf = if avail_len < Self::ENCODED_LEN {
31559            payload_buf[0..avail_len].copy_from_slice(__input);
31560            Bytes::new(&payload_buf)
31561        } else {
31562            Bytes::new(__input)
31563        };
31564        let mut __struct = Self::default();
31565        __struct.lat = buf.get_i32_le();
31566        __struct.lon = buf.get_i32_le();
31567        __struct.grid_spacing = buf.get_u16_le();
31568        for v in &mut __struct.data {
31569            let val = buf.get_i16_le();
31570            *v = val;
31571        }
31572        __struct.gridbit = buf.get_u8();
31573        Ok(__struct)
31574    }
31575    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31576        let mut __tmp = BytesMut::new(bytes);
31577        #[allow(clippy::absurd_extreme_comparisons)]
31578        #[allow(unused_comparisons)]
31579        if __tmp.remaining() < Self::ENCODED_LEN {
31580            panic!(
31581                "buffer is too small (need {} bytes, but got {})",
31582                Self::ENCODED_LEN,
31583                __tmp.remaining(),
31584            )
31585        }
31586        __tmp.put_i32_le(self.lat);
31587        __tmp.put_i32_le(self.lon);
31588        __tmp.put_u16_le(self.grid_spacing);
31589        for val in &self.data {
31590            __tmp.put_i16_le(*val);
31591        }
31592        __tmp.put_u8(self.gridbit);
31593        if matches!(version, MavlinkVersion::V2) {
31594            let len = __tmp.len();
31595            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31596        } else {
31597            __tmp.len()
31598        }
31599    }
31600}
31601#[doc = "Streamed from drone to report progress of terrain map download (initiated by TERRAIN_REQUEST), or sent as a response to a TERRAIN_CHECK request. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
31602#[doc = ""]
31603#[doc = "ID: 136"]
31604#[derive(Debug, Clone, PartialEq)]
31605#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31606#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31607#[cfg_attr(feature = "ts", derive(TS))]
31608#[cfg_attr(feature = "ts", ts(export))]
31609pub struct TERRAIN_REPORT_DATA {
31610    #[doc = "Latitude"]
31611    pub lat: i32,
31612    #[doc = "Longitude"]
31613    pub lon: i32,
31614    #[doc = "Terrain height MSL"]
31615    pub terrain_height: f32,
31616    #[doc = "Current vehicle height above lat/lon terrain height"]
31617    pub current_height: f32,
31618    #[doc = "grid spacing (zero if terrain at this location unavailable)"]
31619    pub spacing: u16,
31620    #[doc = "Number of 4x4 terrain blocks waiting to be received or read from disk"]
31621    pub pending: u16,
31622    #[doc = "Number of 4x4 terrain blocks in memory"]
31623    pub loaded: u16,
31624}
31625impl TERRAIN_REPORT_DATA {
31626    pub const ENCODED_LEN: usize = 22usize;
31627    pub const DEFAULT: Self = Self {
31628        lat: 0_i32,
31629        lon: 0_i32,
31630        terrain_height: 0.0_f32,
31631        current_height: 0.0_f32,
31632        spacing: 0_u16,
31633        pending: 0_u16,
31634        loaded: 0_u16,
31635    };
31636    #[cfg(feature = "arbitrary")]
31637    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31638        use arbitrary::{Arbitrary, Unstructured};
31639        let mut buf = [0u8; 1024];
31640        rng.fill_bytes(&mut buf);
31641        let mut unstructured = Unstructured::new(&buf);
31642        Self::arbitrary(&mut unstructured).unwrap_or_default()
31643    }
31644}
31645impl Default for TERRAIN_REPORT_DATA {
31646    fn default() -> Self {
31647        Self::DEFAULT.clone()
31648    }
31649}
31650impl MessageData for TERRAIN_REPORT_DATA {
31651    type Message = MavMessage;
31652    const ID: u32 = 136u32;
31653    const NAME: &'static str = "TERRAIN_REPORT";
31654    const EXTRA_CRC: u8 = 1u8;
31655    const ENCODED_LEN: usize = 22usize;
31656    fn deser(
31657        _version: MavlinkVersion,
31658        __input: &[u8],
31659    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31660        let avail_len = __input.len();
31661        let mut payload_buf = [0; Self::ENCODED_LEN];
31662        let mut buf = if avail_len < Self::ENCODED_LEN {
31663            payload_buf[0..avail_len].copy_from_slice(__input);
31664            Bytes::new(&payload_buf)
31665        } else {
31666            Bytes::new(__input)
31667        };
31668        let mut __struct = Self::default();
31669        __struct.lat = buf.get_i32_le();
31670        __struct.lon = buf.get_i32_le();
31671        __struct.terrain_height = buf.get_f32_le();
31672        __struct.current_height = buf.get_f32_le();
31673        __struct.spacing = buf.get_u16_le();
31674        __struct.pending = buf.get_u16_le();
31675        __struct.loaded = buf.get_u16_le();
31676        Ok(__struct)
31677    }
31678    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31679        let mut __tmp = BytesMut::new(bytes);
31680        #[allow(clippy::absurd_extreme_comparisons)]
31681        #[allow(unused_comparisons)]
31682        if __tmp.remaining() < Self::ENCODED_LEN {
31683            panic!(
31684                "buffer is too small (need {} bytes, but got {})",
31685                Self::ENCODED_LEN,
31686                __tmp.remaining(),
31687            )
31688        }
31689        __tmp.put_i32_le(self.lat);
31690        __tmp.put_i32_le(self.lon);
31691        __tmp.put_f32_le(self.terrain_height);
31692        __tmp.put_f32_le(self.current_height);
31693        __tmp.put_u16_le(self.spacing);
31694        __tmp.put_u16_le(self.pending);
31695        __tmp.put_u16_le(self.loaded);
31696        if matches!(version, MavlinkVersion::V2) {
31697            let len = __tmp.len();
31698            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31699        } else {
31700            __tmp.len()
31701        }
31702    }
31703}
31704#[doc = "Request for terrain data and terrain status. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
31705#[doc = ""]
31706#[doc = "ID: 133"]
31707#[derive(Debug, Clone, PartialEq)]
31708#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31709#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31710#[cfg_attr(feature = "ts", derive(TS))]
31711#[cfg_attr(feature = "ts", ts(export))]
31712pub struct TERRAIN_REQUEST_DATA {
31713    #[doc = "Bitmask of requested 4x4 grids (row major 8x7 array of grids, 56 bits)"]
31714    pub mask: u64,
31715    #[doc = "Latitude of SW corner of first grid"]
31716    pub lat: i32,
31717    #[doc = "Longitude of SW corner of first grid"]
31718    pub lon: i32,
31719    #[doc = "Grid spacing"]
31720    pub grid_spacing: u16,
31721}
31722impl TERRAIN_REQUEST_DATA {
31723    pub const ENCODED_LEN: usize = 18usize;
31724    pub const DEFAULT: Self = Self {
31725        mask: 0_u64,
31726        lat: 0_i32,
31727        lon: 0_i32,
31728        grid_spacing: 0_u16,
31729    };
31730    #[cfg(feature = "arbitrary")]
31731    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31732        use arbitrary::{Arbitrary, Unstructured};
31733        let mut buf = [0u8; 1024];
31734        rng.fill_bytes(&mut buf);
31735        let mut unstructured = Unstructured::new(&buf);
31736        Self::arbitrary(&mut unstructured).unwrap_or_default()
31737    }
31738}
31739impl Default for TERRAIN_REQUEST_DATA {
31740    fn default() -> Self {
31741        Self::DEFAULT.clone()
31742    }
31743}
31744impl MessageData for TERRAIN_REQUEST_DATA {
31745    type Message = MavMessage;
31746    const ID: u32 = 133u32;
31747    const NAME: &'static str = "TERRAIN_REQUEST";
31748    const EXTRA_CRC: u8 = 6u8;
31749    const ENCODED_LEN: usize = 18usize;
31750    fn deser(
31751        _version: MavlinkVersion,
31752        __input: &[u8],
31753    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31754        let avail_len = __input.len();
31755        let mut payload_buf = [0; Self::ENCODED_LEN];
31756        let mut buf = if avail_len < Self::ENCODED_LEN {
31757            payload_buf[0..avail_len].copy_from_slice(__input);
31758            Bytes::new(&payload_buf)
31759        } else {
31760            Bytes::new(__input)
31761        };
31762        let mut __struct = Self::default();
31763        __struct.mask = buf.get_u64_le();
31764        __struct.lat = buf.get_i32_le();
31765        __struct.lon = buf.get_i32_le();
31766        __struct.grid_spacing = buf.get_u16_le();
31767        Ok(__struct)
31768    }
31769    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31770        let mut __tmp = BytesMut::new(bytes);
31771        #[allow(clippy::absurd_extreme_comparisons)]
31772        #[allow(unused_comparisons)]
31773        if __tmp.remaining() < Self::ENCODED_LEN {
31774            panic!(
31775                "buffer is too small (need {} bytes, but got {})",
31776                Self::ENCODED_LEN,
31777                __tmp.remaining(),
31778            )
31779        }
31780        __tmp.put_u64_le(self.mask);
31781        __tmp.put_i32_le(self.lat);
31782        __tmp.put_i32_le(self.lon);
31783        __tmp.put_u16_le(self.grid_spacing);
31784        if matches!(version, MavlinkVersion::V2) {
31785            let len = __tmp.len();
31786            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31787        } else {
31788            __tmp.len()
31789        }
31790    }
31791}
31792#[doc = "Time synchronization message.         The message is used for both timesync requests and responses.         The request is sent with `ts1=syncing component timestamp` and `tc1=0`, and may be broadcast or targeted to a specific system/component.         The response is sent with `ts1=syncing component timestamp` (mirror back unchanged), and `tc1=responding component timestamp`, with the `target_system` and `target_component` set to ids of the original request.         Systems can determine if they are receiving a request or response based on the value of `tc`.         If the response has `target_system==target_component==0` the remote system has not been updated to use the component IDs and cannot reliably timesync; the requestor may report an error.         Timestamps are UNIX Epoch time or time since system boot in nanoseconds (the timestamp format can be inferred by checking for the magnitude of the number; generally it doesn't matter as only the offset is used).         The message sequence is repeated numerous times with results being filtered/averaged to estimate the offset.         See also: <https://mavlink.io/en/services/timesync.html>."]
31793#[doc = ""]
31794#[doc = "ID: 111"]
31795#[derive(Debug, Clone, PartialEq)]
31796#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31797#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31798#[cfg_attr(feature = "ts", derive(TS))]
31799#[cfg_attr(feature = "ts", ts(export))]
31800pub struct TIMESYNC_DATA {
31801    #[doc = "Time sync timestamp 1. Syncing: 0. Responding: Timestamp of responding component."]
31802    pub tc1: i64,
31803    #[doc = "Time sync timestamp 2. Timestamp of syncing component (mirrored in response)."]
31804    pub ts1: i64,
31805    #[doc = "Target system id. Request: 0 (broadcast) or id of specific system. Response must contain system id of the requesting component."]
31806    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31807    pub target_system: u8,
31808    #[doc = "Target component id. Request: 0 (broadcast) or id of specific component. Response must contain component id of the requesting component."]
31809    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31810    pub target_component: u8,
31811}
31812impl TIMESYNC_DATA {
31813    pub const ENCODED_LEN: usize = 18usize;
31814    pub const DEFAULT: Self = Self {
31815        tc1: 0_i64,
31816        ts1: 0_i64,
31817        target_system: 0_u8,
31818        target_component: 0_u8,
31819    };
31820    #[cfg(feature = "arbitrary")]
31821    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31822        use arbitrary::{Arbitrary, Unstructured};
31823        let mut buf = [0u8; 1024];
31824        rng.fill_bytes(&mut buf);
31825        let mut unstructured = Unstructured::new(&buf);
31826        Self::arbitrary(&mut unstructured).unwrap_or_default()
31827    }
31828}
31829impl Default for TIMESYNC_DATA {
31830    fn default() -> Self {
31831        Self::DEFAULT.clone()
31832    }
31833}
31834impl MessageData for TIMESYNC_DATA {
31835    type Message = MavMessage;
31836    const ID: u32 = 111u32;
31837    const NAME: &'static str = "TIMESYNC";
31838    const EXTRA_CRC: u8 = 34u8;
31839    const ENCODED_LEN: usize = 18usize;
31840    fn deser(
31841        _version: MavlinkVersion,
31842        __input: &[u8],
31843    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31844        let avail_len = __input.len();
31845        let mut payload_buf = [0; Self::ENCODED_LEN];
31846        let mut buf = if avail_len < Self::ENCODED_LEN {
31847            payload_buf[0..avail_len].copy_from_slice(__input);
31848            Bytes::new(&payload_buf)
31849        } else {
31850            Bytes::new(__input)
31851        };
31852        let mut __struct = Self::default();
31853        __struct.tc1 = buf.get_i64_le();
31854        __struct.ts1 = buf.get_i64_le();
31855        __struct.target_system = buf.get_u8();
31856        __struct.target_component = buf.get_u8();
31857        Ok(__struct)
31858    }
31859    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31860        let mut __tmp = BytesMut::new(bytes);
31861        #[allow(clippy::absurd_extreme_comparisons)]
31862        #[allow(unused_comparisons)]
31863        if __tmp.remaining() < Self::ENCODED_LEN {
31864            panic!(
31865                "buffer is too small (need {} bytes, but got {})",
31866                Self::ENCODED_LEN,
31867                __tmp.remaining(),
31868            )
31869        }
31870        __tmp.put_i64_le(self.tc1);
31871        __tmp.put_i64_le(self.ts1);
31872        if matches!(version, MavlinkVersion::V2) {
31873            __tmp.put_u8(self.target_system);
31874            __tmp.put_u8(self.target_component);
31875            let len = __tmp.len();
31876            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31877        } else {
31878            __tmp.len()
31879        }
31880    }
31881}
31882#[doc = "Time/duration estimates for various events and actions given the current vehicle state and position."]
31883#[doc = ""]
31884#[doc = "ID: 380"]
31885#[derive(Debug, Clone, PartialEq)]
31886#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31887#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31888#[cfg_attr(feature = "ts", derive(TS))]
31889#[cfg_attr(feature = "ts", ts(export))]
31890pub struct TIME_ESTIMATE_TO_TARGET_DATA {
31891    #[doc = "Estimated time to complete the vehicle's configured \"safe return\" action from its current position (e.g. RTL, Smart RTL, etc.). -1 indicates that the vehicle is landed, or that no time estimate available."]
31892    pub safe_return: i32,
31893    #[doc = "Estimated time for vehicle to complete the LAND action from its current position. -1 indicates that the vehicle is landed, or that no time estimate available."]
31894    pub land: i32,
31895    #[doc = "Estimated time for reaching/completing the currently active mission item. -1 means no time estimate available."]
31896    pub mission_next_item: i32,
31897    #[doc = "Estimated time for completing the current mission. -1 means no mission active and/or no estimate available."]
31898    pub mission_end: i32,
31899    #[doc = "Estimated time for completing the current commanded action (i.e. Go To, Takeoff, Land, etc.). -1 means no action active and/or no estimate available."]
31900    pub commanded_action: i32,
31901}
31902impl TIME_ESTIMATE_TO_TARGET_DATA {
31903    pub const ENCODED_LEN: usize = 20usize;
31904    pub const DEFAULT: Self = Self {
31905        safe_return: 0_i32,
31906        land: 0_i32,
31907        mission_next_item: 0_i32,
31908        mission_end: 0_i32,
31909        commanded_action: 0_i32,
31910    };
31911    #[cfg(feature = "arbitrary")]
31912    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31913        use arbitrary::{Arbitrary, Unstructured};
31914        let mut buf = [0u8; 1024];
31915        rng.fill_bytes(&mut buf);
31916        let mut unstructured = Unstructured::new(&buf);
31917        Self::arbitrary(&mut unstructured).unwrap_or_default()
31918    }
31919}
31920impl Default for TIME_ESTIMATE_TO_TARGET_DATA {
31921    fn default() -> Self {
31922        Self::DEFAULT.clone()
31923    }
31924}
31925impl MessageData for TIME_ESTIMATE_TO_TARGET_DATA {
31926    type Message = MavMessage;
31927    const ID: u32 = 380u32;
31928    const NAME: &'static str = "TIME_ESTIMATE_TO_TARGET";
31929    const EXTRA_CRC: u8 = 232u8;
31930    const ENCODED_LEN: usize = 20usize;
31931    fn deser(
31932        _version: MavlinkVersion,
31933        __input: &[u8],
31934    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31935        let avail_len = __input.len();
31936        let mut payload_buf = [0; Self::ENCODED_LEN];
31937        let mut buf = if avail_len < Self::ENCODED_LEN {
31938            payload_buf[0..avail_len].copy_from_slice(__input);
31939            Bytes::new(&payload_buf)
31940        } else {
31941            Bytes::new(__input)
31942        };
31943        let mut __struct = Self::default();
31944        __struct.safe_return = buf.get_i32_le();
31945        __struct.land = buf.get_i32_le();
31946        __struct.mission_next_item = buf.get_i32_le();
31947        __struct.mission_end = buf.get_i32_le();
31948        __struct.commanded_action = buf.get_i32_le();
31949        Ok(__struct)
31950    }
31951    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31952        let mut __tmp = BytesMut::new(bytes);
31953        #[allow(clippy::absurd_extreme_comparisons)]
31954        #[allow(unused_comparisons)]
31955        if __tmp.remaining() < Self::ENCODED_LEN {
31956            panic!(
31957                "buffer is too small (need {} bytes, but got {})",
31958                Self::ENCODED_LEN,
31959                __tmp.remaining(),
31960            )
31961        }
31962        __tmp.put_i32_le(self.safe_return);
31963        __tmp.put_i32_le(self.land);
31964        __tmp.put_i32_le(self.mission_next_item);
31965        __tmp.put_i32_le(self.mission_end);
31966        __tmp.put_i32_le(self.commanded_action);
31967        if matches!(version, MavlinkVersion::V2) {
31968            let len = __tmp.len();
31969            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31970        } else {
31971            __tmp.len()
31972        }
31973    }
31974}
31975#[doc = "Describe a trajectory using an array of up-to 5 bezier control points in the local frame (MAV_FRAME_LOCAL_NED)."]
31976#[doc = ""]
31977#[doc = "ID: 333"]
31978#[derive(Debug, Clone, PartialEq)]
31979#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31980#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31981#[cfg_attr(feature = "ts", derive(TS))]
31982#[cfg_attr(feature = "ts", ts(export))]
31983pub struct TRAJECTORY_REPRESENTATION_BEZIER_DATA {
31984    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
31985    pub time_usec: u64,
31986    #[doc = "X-coordinate of bezier control points. Set to NaN if not being used"]
31987    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31988    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31989    pub pos_x: [f32; 5],
31990    #[doc = "Y-coordinate of bezier control points. Set to NaN if not being used"]
31991    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31992    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31993    pub pos_y: [f32; 5],
31994    #[doc = "Z-coordinate of bezier control points. Set to NaN if not being used"]
31995    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31996    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31997    pub pos_z: [f32; 5],
31998    #[doc = "Bezier time horizon. Set to NaN if velocity/acceleration should not be incorporated"]
31999    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32000    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32001    pub delta: [f32; 5],
32002    #[doc = "Yaw. Set to NaN for unchanged"]
32003    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32004    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32005    pub pos_yaw: [f32; 5],
32006    #[doc = "Number of valid control points (up-to 5 points are possible)"]
32007    pub valid_points: u8,
32008}
32009impl TRAJECTORY_REPRESENTATION_BEZIER_DATA {
32010    pub const ENCODED_LEN: usize = 109usize;
32011    pub const DEFAULT: Self = Self {
32012        time_usec: 0_u64,
32013        pos_x: [0.0_f32; 5usize],
32014        pos_y: [0.0_f32; 5usize],
32015        pos_z: [0.0_f32; 5usize],
32016        delta: [0.0_f32; 5usize],
32017        pos_yaw: [0.0_f32; 5usize],
32018        valid_points: 0_u8,
32019    };
32020    #[cfg(feature = "arbitrary")]
32021    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32022        use arbitrary::{Arbitrary, Unstructured};
32023        let mut buf = [0u8; 1024];
32024        rng.fill_bytes(&mut buf);
32025        let mut unstructured = Unstructured::new(&buf);
32026        Self::arbitrary(&mut unstructured).unwrap_or_default()
32027    }
32028}
32029impl Default for TRAJECTORY_REPRESENTATION_BEZIER_DATA {
32030    fn default() -> Self {
32031        Self::DEFAULT.clone()
32032    }
32033}
32034impl MessageData for TRAJECTORY_REPRESENTATION_BEZIER_DATA {
32035    type Message = MavMessage;
32036    const ID: u32 = 333u32;
32037    const NAME: &'static str = "TRAJECTORY_REPRESENTATION_BEZIER";
32038    const EXTRA_CRC: u8 = 231u8;
32039    const ENCODED_LEN: usize = 109usize;
32040    fn deser(
32041        _version: MavlinkVersion,
32042        __input: &[u8],
32043    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32044        let avail_len = __input.len();
32045        let mut payload_buf = [0; Self::ENCODED_LEN];
32046        let mut buf = if avail_len < Self::ENCODED_LEN {
32047            payload_buf[0..avail_len].copy_from_slice(__input);
32048            Bytes::new(&payload_buf)
32049        } else {
32050            Bytes::new(__input)
32051        };
32052        let mut __struct = Self::default();
32053        __struct.time_usec = buf.get_u64_le();
32054        for v in &mut __struct.pos_x {
32055            let val = buf.get_f32_le();
32056            *v = val;
32057        }
32058        for v in &mut __struct.pos_y {
32059            let val = buf.get_f32_le();
32060            *v = val;
32061        }
32062        for v in &mut __struct.pos_z {
32063            let val = buf.get_f32_le();
32064            *v = val;
32065        }
32066        for v in &mut __struct.delta {
32067            let val = buf.get_f32_le();
32068            *v = val;
32069        }
32070        for v in &mut __struct.pos_yaw {
32071            let val = buf.get_f32_le();
32072            *v = val;
32073        }
32074        __struct.valid_points = buf.get_u8();
32075        Ok(__struct)
32076    }
32077    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32078        let mut __tmp = BytesMut::new(bytes);
32079        #[allow(clippy::absurd_extreme_comparisons)]
32080        #[allow(unused_comparisons)]
32081        if __tmp.remaining() < Self::ENCODED_LEN {
32082            panic!(
32083                "buffer is too small (need {} bytes, but got {})",
32084                Self::ENCODED_LEN,
32085                __tmp.remaining(),
32086            )
32087        }
32088        __tmp.put_u64_le(self.time_usec);
32089        for val in &self.pos_x {
32090            __tmp.put_f32_le(*val);
32091        }
32092        for val in &self.pos_y {
32093            __tmp.put_f32_le(*val);
32094        }
32095        for val in &self.pos_z {
32096            __tmp.put_f32_le(*val);
32097        }
32098        for val in &self.delta {
32099            __tmp.put_f32_le(*val);
32100        }
32101        for val in &self.pos_yaw {
32102            __tmp.put_f32_le(*val);
32103        }
32104        __tmp.put_u8(self.valid_points);
32105        if matches!(version, MavlinkVersion::V2) {
32106            let len = __tmp.len();
32107            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32108        } else {
32109            __tmp.len()
32110        }
32111    }
32112}
32113#[doc = "Describe a trajectory using an array of up-to 5 waypoints in the local frame (MAV_FRAME_LOCAL_NED)."]
32114#[doc = ""]
32115#[doc = "ID: 332"]
32116#[derive(Debug, Clone, PartialEq)]
32117#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32118#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32119#[cfg_attr(feature = "ts", derive(TS))]
32120#[cfg_attr(feature = "ts", ts(export))]
32121pub struct TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
32122    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
32123    pub time_usec: u64,
32124    #[doc = "X-coordinate of waypoint, set to NaN if not being used"]
32125    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32126    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32127    pub pos_x: [f32; 5],
32128    #[doc = "Y-coordinate of waypoint, set to NaN if not being used"]
32129    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32130    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32131    pub pos_y: [f32; 5],
32132    #[doc = "Z-coordinate of waypoint, set to NaN if not being used"]
32133    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32134    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32135    pub pos_z: [f32; 5],
32136    #[doc = "X-velocity of waypoint, set to NaN if not being used"]
32137    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32138    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32139    pub vel_x: [f32; 5],
32140    #[doc = "Y-velocity of waypoint, set to NaN if not being used"]
32141    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32142    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32143    pub vel_y: [f32; 5],
32144    #[doc = "Z-velocity of waypoint, set to NaN if not being used"]
32145    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32146    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32147    pub vel_z: [f32; 5],
32148    #[doc = "X-acceleration of waypoint, set to NaN if not being used"]
32149    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32150    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32151    pub acc_x: [f32; 5],
32152    #[doc = "Y-acceleration of waypoint, set to NaN if not being used"]
32153    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32154    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32155    pub acc_y: [f32; 5],
32156    #[doc = "Z-acceleration of waypoint, set to NaN if not being used"]
32157    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32158    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32159    pub acc_z: [f32; 5],
32160    #[doc = "Yaw angle, set to NaN if not being used"]
32161    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32162    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32163    pub pos_yaw: [f32; 5],
32164    #[doc = "Yaw rate, set to NaN if not being used"]
32165    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32166    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32167    pub vel_yaw: [f32; 5],
32168    #[doc = "MAV_CMD command id of waypoint, set to UINT16_MAX if not being used."]
32169    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32170    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32171    pub command: [u16; 5],
32172    #[doc = "Number of valid points (up-to 5 waypoints are possible)"]
32173    pub valid_points: u8,
32174}
32175impl TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
32176    pub const ENCODED_LEN: usize = 239usize;
32177    pub const DEFAULT: Self = Self {
32178        time_usec: 0_u64,
32179        pos_x: [0.0_f32; 5usize],
32180        pos_y: [0.0_f32; 5usize],
32181        pos_z: [0.0_f32; 5usize],
32182        vel_x: [0.0_f32; 5usize],
32183        vel_y: [0.0_f32; 5usize],
32184        vel_z: [0.0_f32; 5usize],
32185        acc_x: [0.0_f32; 5usize],
32186        acc_y: [0.0_f32; 5usize],
32187        acc_z: [0.0_f32; 5usize],
32188        pos_yaw: [0.0_f32; 5usize],
32189        vel_yaw: [0.0_f32; 5usize],
32190        command: [0_u16; 5usize],
32191        valid_points: 0_u8,
32192    };
32193    #[cfg(feature = "arbitrary")]
32194    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32195        use arbitrary::{Arbitrary, Unstructured};
32196        let mut buf = [0u8; 1024];
32197        rng.fill_bytes(&mut buf);
32198        let mut unstructured = Unstructured::new(&buf);
32199        Self::arbitrary(&mut unstructured).unwrap_or_default()
32200    }
32201}
32202impl Default for TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
32203    fn default() -> Self {
32204        Self::DEFAULT.clone()
32205    }
32206}
32207impl MessageData for TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
32208    type Message = MavMessage;
32209    const ID: u32 = 332u32;
32210    const NAME: &'static str = "TRAJECTORY_REPRESENTATION_WAYPOINTS";
32211    const EXTRA_CRC: u8 = 236u8;
32212    const ENCODED_LEN: usize = 239usize;
32213    fn deser(
32214        _version: MavlinkVersion,
32215        __input: &[u8],
32216    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32217        let avail_len = __input.len();
32218        let mut payload_buf = [0; Self::ENCODED_LEN];
32219        let mut buf = if avail_len < Self::ENCODED_LEN {
32220            payload_buf[0..avail_len].copy_from_slice(__input);
32221            Bytes::new(&payload_buf)
32222        } else {
32223            Bytes::new(__input)
32224        };
32225        let mut __struct = Self::default();
32226        __struct.time_usec = buf.get_u64_le();
32227        for v in &mut __struct.pos_x {
32228            let val = buf.get_f32_le();
32229            *v = val;
32230        }
32231        for v in &mut __struct.pos_y {
32232            let val = buf.get_f32_le();
32233            *v = val;
32234        }
32235        for v in &mut __struct.pos_z {
32236            let val = buf.get_f32_le();
32237            *v = val;
32238        }
32239        for v in &mut __struct.vel_x {
32240            let val = buf.get_f32_le();
32241            *v = val;
32242        }
32243        for v in &mut __struct.vel_y {
32244            let val = buf.get_f32_le();
32245            *v = val;
32246        }
32247        for v in &mut __struct.vel_z {
32248            let val = buf.get_f32_le();
32249            *v = val;
32250        }
32251        for v in &mut __struct.acc_x {
32252            let val = buf.get_f32_le();
32253            *v = val;
32254        }
32255        for v in &mut __struct.acc_y {
32256            let val = buf.get_f32_le();
32257            *v = val;
32258        }
32259        for v in &mut __struct.acc_z {
32260            let val = buf.get_f32_le();
32261            *v = val;
32262        }
32263        for v in &mut __struct.pos_yaw {
32264            let val = buf.get_f32_le();
32265            *v = val;
32266        }
32267        for v in &mut __struct.vel_yaw {
32268            let val = buf.get_f32_le();
32269            *v = val;
32270        }
32271        for v in &mut __struct.command {
32272            let val = buf.get_u16_le();
32273            *v = val;
32274        }
32275        __struct.valid_points = buf.get_u8();
32276        Ok(__struct)
32277    }
32278    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32279        let mut __tmp = BytesMut::new(bytes);
32280        #[allow(clippy::absurd_extreme_comparisons)]
32281        #[allow(unused_comparisons)]
32282        if __tmp.remaining() < Self::ENCODED_LEN {
32283            panic!(
32284                "buffer is too small (need {} bytes, but got {})",
32285                Self::ENCODED_LEN,
32286                __tmp.remaining(),
32287            )
32288        }
32289        __tmp.put_u64_le(self.time_usec);
32290        for val in &self.pos_x {
32291            __tmp.put_f32_le(*val);
32292        }
32293        for val in &self.pos_y {
32294            __tmp.put_f32_le(*val);
32295        }
32296        for val in &self.pos_z {
32297            __tmp.put_f32_le(*val);
32298        }
32299        for val in &self.vel_x {
32300            __tmp.put_f32_le(*val);
32301        }
32302        for val in &self.vel_y {
32303            __tmp.put_f32_le(*val);
32304        }
32305        for val in &self.vel_z {
32306            __tmp.put_f32_le(*val);
32307        }
32308        for val in &self.acc_x {
32309            __tmp.put_f32_le(*val);
32310        }
32311        for val in &self.acc_y {
32312            __tmp.put_f32_le(*val);
32313        }
32314        for val in &self.acc_z {
32315            __tmp.put_f32_le(*val);
32316        }
32317        for val in &self.pos_yaw {
32318            __tmp.put_f32_le(*val);
32319        }
32320        for val in &self.vel_yaw {
32321            __tmp.put_f32_le(*val);
32322        }
32323        for val in &self.command {
32324            __tmp.put_u16_le(*val);
32325        }
32326        __tmp.put_u8(self.valid_points);
32327        if matches!(version, MavlinkVersion::V2) {
32328            let len = __tmp.len();
32329            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32330        } else {
32331            __tmp.len()
32332        }
32333    }
32334}
32335#[doc = "Message for transporting \"arbitrary\" variable-length data from one component to another (broadcast is not forbidden, but discouraged). The encoding of the data is usually extension specific, i.e. determined by the source, and is usually not documented as part of the MAVLink specification."]
32336#[doc = ""]
32337#[doc = "ID: 385"]
32338#[derive(Debug, Clone, PartialEq)]
32339#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32340#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32341#[cfg_attr(feature = "ts", derive(TS))]
32342#[cfg_attr(feature = "ts", ts(export))]
32343pub struct TUNNEL_DATA {
32344    #[doc = "A code that identifies the content of the payload (0 for unknown, which is the default). If this code is less than 32768, it is a 'registered' payload type and the corresponding code should be added to the MAV_TUNNEL_PAYLOAD_TYPE enum. Software creators can register blocks of types as needed. Codes greater than 32767 are considered local experiments and should not be checked in to any widely distributed codebase."]
32345    pub payload_type: MavTunnelPayloadType,
32346    #[doc = "System ID (can be 0 for broadcast, but this is discouraged)"]
32347    pub target_system: u8,
32348    #[doc = "Component ID (can be 0 for broadcast, but this is discouraged)"]
32349    pub target_component: u8,
32350    #[doc = "Length of the data transported in payload"]
32351    pub payload_length: u8,
32352    #[doc = "Variable length payload. The payload length is defined by payload_length. The entire content of this block is opaque unless you understand the encoding specified by payload_type."]
32353    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32354    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32355    pub payload: [u8; 128],
32356}
32357impl TUNNEL_DATA {
32358    pub const ENCODED_LEN: usize = 133usize;
32359    pub const DEFAULT: Self = Self {
32360        payload_type: MavTunnelPayloadType::DEFAULT,
32361        target_system: 0_u8,
32362        target_component: 0_u8,
32363        payload_length: 0_u8,
32364        payload: [0_u8; 128usize],
32365    };
32366    #[cfg(feature = "arbitrary")]
32367    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32368        use arbitrary::{Arbitrary, Unstructured};
32369        let mut buf = [0u8; 1024];
32370        rng.fill_bytes(&mut buf);
32371        let mut unstructured = Unstructured::new(&buf);
32372        Self::arbitrary(&mut unstructured).unwrap_or_default()
32373    }
32374}
32375impl Default for TUNNEL_DATA {
32376    fn default() -> Self {
32377        Self::DEFAULT.clone()
32378    }
32379}
32380impl MessageData for TUNNEL_DATA {
32381    type Message = MavMessage;
32382    const ID: u32 = 385u32;
32383    const NAME: &'static str = "TUNNEL";
32384    const EXTRA_CRC: u8 = 147u8;
32385    const ENCODED_LEN: usize = 133usize;
32386    fn deser(
32387        _version: MavlinkVersion,
32388        __input: &[u8],
32389    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32390        let avail_len = __input.len();
32391        let mut payload_buf = [0; Self::ENCODED_LEN];
32392        let mut buf = if avail_len < Self::ENCODED_LEN {
32393            payload_buf[0..avail_len].copy_from_slice(__input);
32394            Bytes::new(&payload_buf)
32395        } else {
32396            Bytes::new(__input)
32397        };
32398        let mut __struct = Self::default();
32399        let tmp = buf.get_u16_le();
32400        __struct.payload_type = FromPrimitive::from_u16(tmp).ok_or(
32401            ::mavlink_core::error::ParserError::InvalidEnum {
32402                enum_type: "MavTunnelPayloadType",
32403                value: tmp as u32,
32404            },
32405        )?;
32406        __struct.target_system = buf.get_u8();
32407        __struct.target_component = buf.get_u8();
32408        __struct.payload_length = buf.get_u8();
32409        for v in &mut __struct.payload {
32410            let val = buf.get_u8();
32411            *v = val;
32412        }
32413        Ok(__struct)
32414    }
32415    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32416        let mut __tmp = BytesMut::new(bytes);
32417        #[allow(clippy::absurd_extreme_comparisons)]
32418        #[allow(unused_comparisons)]
32419        if __tmp.remaining() < Self::ENCODED_LEN {
32420            panic!(
32421                "buffer is too small (need {} bytes, but got {})",
32422                Self::ENCODED_LEN,
32423                __tmp.remaining(),
32424            )
32425        }
32426        __tmp.put_u16_le(self.payload_type as u16);
32427        __tmp.put_u8(self.target_system);
32428        __tmp.put_u8(self.target_component);
32429        __tmp.put_u8(self.payload_length);
32430        for val in &self.payload {
32431            __tmp.put_u8(*val);
32432        }
32433        if matches!(version, MavlinkVersion::V2) {
32434            let len = __tmp.len();
32435            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32436        } else {
32437            __tmp.len()
32438        }
32439    }
32440}
32441#[doc = "General information describing a particular UAVCAN node. Please refer to the definition of the UAVCAN service \"uavcan.protocol.GetNodeInfo\" for the background information. This message should be emitted by the system whenever a new node appears online, or an existing node reboots. Additionally, it can be emitted upon request from the other end of the MAVLink channel (see MAV_CMD_UAVCAN_GET_NODE_INFO). It is also not prohibited to emit this message unconditionally at a low frequency. The UAVCAN specification is available at <http://uavcan.org>."]
32442#[doc = ""]
32443#[doc = "ID: 311"]
32444#[derive(Debug, Clone, PartialEq)]
32445#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32446#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32447#[cfg_attr(feature = "ts", derive(TS))]
32448#[cfg_attr(feature = "ts", ts(export))]
32449pub struct UAVCAN_NODE_INFO_DATA {
32450    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
32451    pub time_usec: u64,
32452    #[doc = "Time since the start-up of the node."]
32453    pub uptime_sec: u32,
32454    #[doc = "Version control system (VCS) revision identifier (e.g. git short commit hash). 0 if unknown."]
32455    pub sw_vcs_commit: u32,
32456    #[doc = "Node name string. For example, \"sapog.px4.io\"."]
32457    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32458    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32459    pub name: [u8; 80],
32460    #[doc = "Hardware major version number."]
32461    pub hw_version_major: u8,
32462    #[doc = "Hardware minor version number."]
32463    pub hw_version_minor: u8,
32464    #[doc = "Hardware unique 128-bit ID."]
32465    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32466    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32467    pub hw_unique_id: [u8; 16],
32468    #[doc = "Software major version number."]
32469    pub sw_version_major: u8,
32470    #[doc = "Software minor version number."]
32471    pub sw_version_minor: u8,
32472}
32473impl UAVCAN_NODE_INFO_DATA {
32474    pub const ENCODED_LEN: usize = 116usize;
32475    pub const DEFAULT: Self = Self {
32476        time_usec: 0_u64,
32477        uptime_sec: 0_u32,
32478        sw_vcs_commit: 0_u32,
32479        name: [0_u8; 80usize],
32480        hw_version_major: 0_u8,
32481        hw_version_minor: 0_u8,
32482        hw_unique_id: [0_u8; 16usize],
32483        sw_version_major: 0_u8,
32484        sw_version_minor: 0_u8,
32485    };
32486    #[cfg(feature = "arbitrary")]
32487    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32488        use arbitrary::{Arbitrary, Unstructured};
32489        let mut buf = [0u8; 1024];
32490        rng.fill_bytes(&mut buf);
32491        let mut unstructured = Unstructured::new(&buf);
32492        Self::arbitrary(&mut unstructured).unwrap_or_default()
32493    }
32494}
32495impl Default for UAVCAN_NODE_INFO_DATA {
32496    fn default() -> Self {
32497        Self::DEFAULT.clone()
32498    }
32499}
32500impl MessageData for UAVCAN_NODE_INFO_DATA {
32501    type Message = MavMessage;
32502    const ID: u32 = 311u32;
32503    const NAME: &'static str = "UAVCAN_NODE_INFO";
32504    const EXTRA_CRC: u8 = 95u8;
32505    const ENCODED_LEN: usize = 116usize;
32506    fn deser(
32507        _version: MavlinkVersion,
32508        __input: &[u8],
32509    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32510        let avail_len = __input.len();
32511        let mut payload_buf = [0; Self::ENCODED_LEN];
32512        let mut buf = if avail_len < Self::ENCODED_LEN {
32513            payload_buf[0..avail_len].copy_from_slice(__input);
32514            Bytes::new(&payload_buf)
32515        } else {
32516            Bytes::new(__input)
32517        };
32518        let mut __struct = Self::default();
32519        __struct.time_usec = buf.get_u64_le();
32520        __struct.uptime_sec = buf.get_u32_le();
32521        __struct.sw_vcs_commit = buf.get_u32_le();
32522        for v in &mut __struct.name {
32523            let val = buf.get_u8();
32524            *v = val;
32525        }
32526        __struct.hw_version_major = buf.get_u8();
32527        __struct.hw_version_minor = buf.get_u8();
32528        for v in &mut __struct.hw_unique_id {
32529            let val = buf.get_u8();
32530            *v = val;
32531        }
32532        __struct.sw_version_major = buf.get_u8();
32533        __struct.sw_version_minor = buf.get_u8();
32534        Ok(__struct)
32535    }
32536    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32537        let mut __tmp = BytesMut::new(bytes);
32538        #[allow(clippy::absurd_extreme_comparisons)]
32539        #[allow(unused_comparisons)]
32540        if __tmp.remaining() < Self::ENCODED_LEN {
32541            panic!(
32542                "buffer is too small (need {} bytes, but got {})",
32543                Self::ENCODED_LEN,
32544                __tmp.remaining(),
32545            )
32546        }
32547        __tmp.put_u64_le(self.time_usec);
32548        __tmp.put_u32_le(self.uptime_sec);
32549        __tmp.put_u32_le(self.sw_vcs_commit);
32550        for val in &self.name {
32551            __tmp.put_u8(*val);
32552        }
32553        __tmp.put_u8(self.hw_version_major);
32554        __tmp.put_u8(self.hw_version_minor);
32555        for val in &self.hw_unique_id {
32556            __tmp.put_u8(*val);
32557        }
32558        __tmp.put_u8(self.sw_version_major);
32559        __tmp.put_u8(self.sw_version_minor);
32560        if matches!(version, MavlinkVersion::V2) {
32561            let len = __tmp.len();
32562            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32563        } else {
32564            __tmp.len()
32565        }
32566    }
32567}
32568#[doc = "General status information of an UAVCAN node. Please refer to the definition of the UAVCAN message \"uavcan.protocol.NodeStatus\" for the background information. The UAVCAN specification is available at <http://uavcan.org>."]
32569#[doc = ""]
32570#[doc = "ID: 310"]
32571#[derive(Debug, Clone, PartialEq)]
32572#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32573#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32574#[cfg_attr(feature = "ts", derive(TS))]
32575#[cfg_attr(feature = "ts", ts(export))]
32576pub struct UAVCAN_NODE_STATUS_DATA {
32577    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
32578    pub time_usec: u64,
32579    #[doc = "Time since the start-up of the node."]
32580    pub uptime_sec: u32,
32581    #[doc = "Vendor-specific status information."]
32582    pub vendor_specific_status_code: u16,
32583    #[doc = "Generalized node health status."]
32584    pub health: UavcanNodeHealth,
32585    #[doc = "Generalized operating mode."]
32586    pub mode: UavcanNodeMode,
32587    #[doc = "Not used currently."]
32588    pub sub_mode: u8,
32589}
32590impl UAVCAN_NODE_STATUS_DATA {
32591    pub const ENCODED_LEN: usize = 17usize;
32592    pub const DEFAULT: Self = Self {
32593        time_usec: 0_u64,
32594        uptime_sec: 0_u32,
32595        vendor_specific_status_code: 0_u16,
32596        health: UavcanNodeHealth::DEFAULT,
32597        mode: UavcanNodeMode::DEFAULT,
32598        sub_mode: 0_u8,
32599    };
32600    #[cfg(feature = "arbitrary")]
32601    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32602        use arbitrary::{Arbitrary, Unstructured};
32603        let mut buf = [0u8; 1024];
32604        rng.fill_bytes(&mut buf);
32605        let mut unstructured = Unstructured::new(&buf);
32606        Self::arbitrary(&mut unstructured).unwrap_or_default()
32607    }
32608}
32609impl Default for UAVCAN_NODE_STATUS_DATA {
32610    fn default() -> Self {
32611        Self::DEFAULT.clone()
32612    }
32613}
32614impl MessageData for UAVCAN_NODE_STATUS_DATA {
32615    type Message = MavMessage;
32616    const ID: u32 = 310u32;
32617    const NAME: &'static str = "UAVCAN_NODE_STATUS";
32618    const EXTRA_CRC: u8 = 28u8;
32619    const ENCODED_LEN: usize = 17usize;
32620    fn deser(
32621        _version: MavlinkVersion,
32622        __input: &[u8],
32623    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32624        let avail_len = __input.len();
32625        let mut payload_buf = [0; Self::ENCODED_LEN];
32626        let mut buf = if avail_len < Self::ENCODED_LEN {
32627            payload_buf[0..avail_len].copy_from_slice(__input);
32628            Bytes::new(&payload_buf)
32629        } else {
32630            Bytes::new(__input)
32631        };
32632        let mut __struct = Self::default();
32633        __struct.time_usec = buf.get_u64_le();
32634        __struct.uptime_sec = buf.get_u32_le();
32635        __struct.vendor_specific_status_code = buf.get_u16_le();
32636        let tmp = buf.get_u8();
32637        __struct.health =
32638            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
32639                enum_type: "UavcanNodeHealth",
32640                value: tmp as u32,
32641            })?;
32642        let tmp = buf.get_u8();
32643        __struct.mode =
32644            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
32645                enum_type: "UavcanNodeMode",
32646                value: tmp as u32,
32647            })?;
32648        __struct.sub_mode = buf.get_u8();
32649        Ok(__struct)
32650    }
32651    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32652        let mut __tmp = BytesMut::new(bytes);
32653        #[allow(clippy::absurd_extreme_comparisons)]
32654        #[allow(unused_comparisons)]
32655        if __tmp.remaining() < Self::ENCODED_LEN {
32656            panic!(
32657                "buffer is too small (need {} bytes, but got {})",
32658                Self::ENCODED_LEN,
32659                __tmp.remaining(),
32660            )
32661        }
32662        __tmp.put_u64_le(self.time_usec);
32663        __tmp.put_u32_le(self.uptime_sec);
32664        __tmp.put_u16_le(self.vendor_specific_status_code);
32665        __tmp.put_u8(self.health as u8);
32666        __tmp.put_u8(self.mode as u8);
32667        __tmp.put_u8(self.sub_mode);
32668        if matches!(version, MavlinkVersion::V2) {
32669            let len = __tmp.len();
32670            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32671        } else {
32672            __tmp.len()
32673        }
32674    }
32675}
32676#[doc = "The global position resulting from GPS and sensor fusion."]
32677#[doc = ""]
32678#[doc = "ID: 340"]
32679#[derive(Debug, Clone, PartialEq)]
32680#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32681#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32682#[cfg_attr(feature = "ts", derive(TS))]
32683#[cfg_attr(feature = "ts", ts(export))]
32684pub struct UTM_GLOBAL_POSITION_DATA {
32685    #[doc = "Time of applicability of position (microseconds since UNIX epoch)."]
32686    pub time: u64,
32687    #[doc = "Latitude (WGS84)"]
32688    pub lat: i32,
32689    #[doc = "Longitude (WGS84)"]
32690    pub lon: i32,
32691    #[doc = "Altitude (WGS84)"]
32692    pub alt: i32,
32693    #[doc = "Altitude above ground"]
32694    pub relative_alt: i32,
32695    #[doc = "Next waypoint, latitude (WGS84)"]
32696    pub next_lat: i32,
32697    #[doc = "Next waypoint, longitude (WGS84)"]
32698    pub next_lon: i32,
32699    #[doc = "Next waypoint, altitude (WGS84)"]
32700    pub next_alt: i32,
32701    #[doc = "Ground X speed (latitude, positive north)"]
32702    pub vx: i16,
32703    #[doc = "Ground Y speed (longitude, positive east)"]
32704    pub vy: i16,
32705    #[doc = "Ground Z speed (altitude, positive down)"]
32706    pub vz: i16,
32707    #[doc = "Horizontal position uncertainty (standard deviation)"]
32708    pub h_acc: u16,
32709    #[doc = "Altitude uncertainty (standard deviation)"]
32710    pub v_acc: u16,
32711    #[doc = "Speed uncertainty (standard deviation)"]
32712    pub vel_acc: u16,
32713    #[doc = "Time until next update. Set to 0 if unknown or in data driven mode."]
32714    pub update_rate: u16,
32715    #[doc = "Unique UAS ID."]
32716    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32717    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32718    pub uas_id: [u8; 18],
32719    #[doc = "Flight state"]
32720    pub flight_state: UtmFlightState,
32721    #[doc = "Bitwise OR combination of the data available flags."]
32722    pub flags: UtmDataAvailFlags,
32723}
32724impl UTM_GLOBAL_POSITION_DATA {
32725    pub const ENCODED_LEN: usize = 70usize;
32726    pub const DEFAULT: Self = Self {
32727        time: 0_u64,
32728        lat: 0_i32,
32729        lon: 0_i32,
32730        alt: 0_i32,
32731        relative_alt: 0_i32,
32732        next_lat: 0_i32,
32733        next_lon: 0_i32,
32734        next_alt: 0_i32,
32735        vx: 0_i16,
32736        vy: 0_i16,
32737        vz: 0_i16,
32738        h_acc: 0_u16,
32739        v_acc: 0_u16,
32740        vel_acc: 0_u16,
32741        update_rate: 0_u16,
32742        uas_id: [0_u8; 18usize],
32743        flight_state: UtmFlightState::DEFAULT,
32744        flags: UtmDataAvailFlags::DEFAULT,
32745    };
32746    #[cfg(feature = "arbitrary")]
32747    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32748        use arbitrary::{Arbitrary, Unstructured};
32749        let mut buf = [0u8; 1024];
32750        rng.fill_bytes(&mut buf);
32751        let mut unstructured = Unstructured::new(&buf);
32752        Self::arbitrary(&mut unstructured).unwrap_or_default()
32753    }
32754}
32755impl Default for UTM_GLOBAL_POSITION_DATA {
32756    fn default() -> Self {
32757        Self::DEFAULT.clone()
32758    }
32759}
32760impl MessageData for UTM_GLOBAL_POSITION_DATA {
32761    type Message = MavMessage;
32762    const ID: u32 = 340u32;
32763    const NAME: &'static str = "UTM_GLOBAL_POSITION";
32764    const EXTRA_CRC: u8 = 99u8;
32765    const ENCODED_LEN: usize = 70usize;
32766    fn deser(
32767        _version: MavlinkVersion,
32768        __input: &[u8],
32769    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32770        let avail_len = __input.len();
32771        let mut payload_buf = [0; Self::ENCODED_LEN];
32772        let mut buf = if avail_len < Self::ENCODED_LEN {
32773            payload_buf[0..avail_len].copy_from_slice(__input);
32774            Bytes::new(&payload_buf)
32775        } else {
32776            Bytes::new(__input)
32777        };
32778        let mut __struct = Self::default();
32779        __struct.time = buf.get_u64_le();
32780        __struct.lat = buf.get_i32_le();
32781        __struct.lon = buf.get_i32_le();
32782        __struct.alt = buf.get_i32_le();
32783        __struct.relative_alt = buf.get_i32_le();
32784        __struct.next_lat = buf.get_i32_le();
32785        __struct.next_lon = buf.get_i32_le();
32786        __struct.next_alt = buf.get_i32_le();
32787        __struct.vx = buf.get_i16_le();
32788        __struct.vy = buf.get_i16_le();
32789        __struct.vz = buf.get_i16_le();
32790        __struct.h_acc = buf.get_u16_le();
32791        __struct.v_acc = buf.get_u16_le();
32792        __struct.vel_acc = buf.get_u16_le();
32793        __struct.update_rate = buf.get_u16_le();
32794        for v in &mut __struct.uas_id {
32795            let val = buf.get_u8();
32796            *v = val;
32797        }
32798        let tmp = buf.get_u8();
32799        __struct.flight_state =
32800            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
32801                enum_type: "UtmFlightState",
32802                value: tmp as u32,
32803            })?;
32804        let tmp = buf.get_u8();
32805        __struct.flags = UtmDataAvailFlags::from_bits(tmp & UtmDataAvailFlags::all().bits())
32806            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
32807                flag_type: "UtmDataAvailFlags",
32808                value: tmp as u32,
32809            })?;
32810        Ok(__struct)
32811    }
32812    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32813        let mut __tmp = BytesMut::new(bytes);
32814        #[allow(clippy::absurd_extreme_comparisons)]
32815        #[allow(unused_comparisons)]
32816        if __tmp.remaining() < Self::ENCODED_LEN {
32817            panic!(
32818                "buffer is too small (need {} bytes, but got {})",
32819                Self::ENCODED_LEN,
32820                __tmp.remaining(),
32821            )
32822        }
32823        __tmp.put_u64_le(self.time);
32824        __tmp.put_i32_le(self.lat);
32825        __tmp.put_i32_le(self.lon);
32826        __tmp.put_i32_le(self.alt);
32827        __tmp.put_i32_le(self.relative_alt);
32828        __tmp.put_i32_le(self.next_lat);
32829        __tmp.put_i32_le(self.next_lon);
32830        __tmp.put_i32_le(self.next_alt);
32831        __tmp.put_i16_le(self.vx);
32832        __tmp.put_i16_le(self.vy);
32833        __tmp.put_i16_le(self.vz);
32834        __tmp.put_u16_le(self.h_acc);
32835        __tmp.put_u16_le(self.v_acc);
32836        __tmp.put_u16_le(self.vel_acc);
32837        __tmp.put_u16_le(self.update_rate);
32838        for val in &self.uas_id {
32839            __tmp.put_u8(*val);
32840        }
32841        __tmp.put_u8(self.flight_state as u8);
32842        __tmp.put_u8(self.flags.bits());
32843        if matches!(version, MavlinkVersion::V2) {
32844            let len = __tmp.len();
32845            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32846        } else {
32847            __tmp.len()
32848        }
32849    }
32850}
32851#[doc = "Message implementing parts of the V2 payload specs in V1 frames for transitional support."]
32852#[doc = ""]
32853#[doc = "ID: 248"]
32854#[derive(Debug, Clone, PartialEq)]
32855#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32856#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32857#[cfg_attr(feature = "ts", derive(TS))]
32858#[cfg_attr(feature = "ts", ts(export))]
32859pub struct V2_EXTENSION_DATA {
32860    #[doc = "A code that identifies the software component that understands this message (analogous to USB device classes or mime type strings). If this code is less than 32768, it is considered a 'registered' protocol extension and the corresponding entry should be added to <https://github.com/mavlink/mavlink/definition_files/extension_message_ids.xml>. Software creators can register blocks of message IDs as needed (useful for GCS specific metadata, etc...). Message_types greater than 32767 are considered local experiments and should not be checked in to any widely distributed codebase."]
32861    pub message_type: u16,
32862    #[doc = "Network ID (0 for broadcast)"]
32863    pub target_network: u8,
32864    #[doc = "System ID (0 for broadcast)"]
32865    pub target_system: u8,
32866    #[doc = "Component ID (0 for broadcast)"]
32867    pub target_component: u8,
32868    #[doc = "Variable length payload. The length must be encoded in the payload as part of the message_type protocol, e.g. by including the length as payload data, or by terminating the payload data with a non-zero marker. This is required in order to reconstruct zero-terminated payloads that are (or otherwise would be) trimmed by MAVLink 2 empty-byte truncation. The entire content of the payload block is opaque unless you understand the encoding message_type. The particular encoding used can be extension specific and might not always be documented as part of the MAVLink specification."]
32869    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32870    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32871    pub payload: [u8; 249],
32872}
32873impl V2_EXTENSION_DATA {
32874    pub const ENCODED_LEN: usize = 254usize;
32875    pub const DEFAULT: Self = Self {
32876        message_type: 0_u16,
32877        target_network: 0_u8,
32878        target_system: 0_u8,
32879        target_component: 0_u8,
32880        payload: [0_u8; 249usize],
32881    };
32882    #[cfg(feature = "arbitrary")]
32883    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32884        use arbitrary::{Arbitrary, Unstructured};
32885        let mut buf = [0u8; 1024];
32886        rng.fill_bytes(&mut buf);
32887        let mut unstructured = Unstructured::new(&buf);
32888        Self::arbitrary(&mut unstructured).unwrap_or_default()
32889    }
32890}
32891impl Default for V2_EXTENSION_DATA {
32892    fn default() -> Self {
32893        Self::DEFAULT.clone()
32894    }
32895}
32896impl MessageData for V2_EXTENSION_DATA {
32897    type Message = MavMessage;
32898    const ID: u32 = 248u32;
32899    const NAME: &'static str = "V2_EXTENSION";
32900    const EXTRA_CRC: u8 = 8u8;
32901    const ENCODED_LEN: usize = 254usize;
32902    fn deser(
32903        _version: MavlinkVersion,
32904        __input: &[u8],
32905    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32906        let avail_len = __input.len();
32907        let mut payload_buf = [0; Self::ENCODED_LEN];
32908        let mut buf = if avail_len < Self::ENCODED_LEN {
32909            payload_buf[0..avail_len].copy_from_slice(__input);
32910            Bytes::new(&payload_buf)
32911        } else {
32912            Bytes::new(__input)
32913        };
32914        let mut __struct = Self::default();
32915        __struct.message_type = buf.get_u16_le();
32916        __struct.target_network = buf.get_u8();
32917        __struct.target_system = buf.get_u8();
32918        __struct.target_component = buf.get_u8();
32919        for v in &mut __struct.payload {
32920            let val = buf.get_u8();
32921            *v = val;
32922        }
32923        Ok(__struct)
32924    }
32925    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32926        let mut __tmp = BytesMut::new(bytes);
32927        #[allow(clippy::absurd_extreme_comparisons)]
32928        #[allow(unused_comparisons)]
32929        if __tmp.remaining() < Self::ENCODED_LEN {
32930            panic!(
32931                "buffer is too small (need {} bytes, but got {})",
32932                Self::ENCODED_LEN,
32933                __tmp.remaining(),
32934            )
32935        }
32936        __tmp.put_u16_le(self.message_type);
32937        __tmp.put_u8(self.target_network);
32938        __tmp.put_u8(self.target_system);
32939        __tmp.put_u8(self.target_component);
32940        for val in &self.payload {
32941            __tmp.put_u8(*val);
32942        }
32943        if matches!(version, MavlinkVersion::V2) {
32944            let len = __tmp.len();
32945            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32946        } else {
32947            __tmp.len()
32948        }
32949    }
32950}
32951#[doc = "Metrics typically displayed on a HUD for fixed wing aircraft."]
32952#[doc = ""]
32953#[doc = "ID: 74"]
32954#[derive(Debug, Clone, PartialEq)]
32955#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32956#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32957#[cfg_attr(feature = "ts", derive(TS))]
32958#[cfg_attr(feature = "ts", ts(export))]
32959pub struct VFR_HUD_DATA {
32960    #[doc = "Vehicle speed in form appropriate for vehicle type. For standard aircraft this is typically calibrated airspeed (CAS) or indicated airspeed (IAS) - either of which can be used by a pilot to estimate stall speed."]
32961    pub airspeed: f32,
32962    #[doc = "Current ground speed."]
32963    pub groundspeed: f32,
32964    #[doc = "Current altitude (MSL)."]
32965    pub alt: f32,
32966    #[doc = "Current climb rate."]
32967    pub climb: f32,
32968    #[doc = "Current heading in compass units (0-360, 0=north)."]
32969    pub heading: i16,
32970    #[doc = "Current throttle setting (0 to 100)."]
32971    pub throttle: u16,
32972}
32973impl VFR_HUD_DATA {
32974    pub const ENCODED_LEN: usize = 20usize;
32975    pub const DEFAULT: Self = Self {
32976        airspeed: 0.0_f32,
32977        groundspeed: 0.0_f32,
32978        alt: 0.0_f32,
32979        climb: 0.0_f32,
32980        heading: 0_i16,
32981        throttle: 0_u16,
32982    };
32983    #[cfg(feature = "arbitrary")]
32984    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32985        use arbitrary::{Arbitrary, Unstructured};
32986        let mut buf = [0u8; 1024];
32987        rng.fill_bytes(&mut buf);
32988        let mut unstructured = Unstructured::new(&buf);
32989        Self::arbitrary(&mut unstructured).unwrap_or_default()
32990    }
32991}
32992impl Default for VFR_HUD_DATA {
32993    fn default() -> Self {
32994        Self::DEFAULT.clone()
32995    }
32996}
32997impl MessageData for VFR_HUD_DATA {
32998    type Message = MavMessage;
32999    const ID: u32 = 74u32;
33000    const NAME: &'static str = "VFR_HUD";
33001    const EXTRA_CRC: u8 = 20u8;
33002    const ENCODED_LEN: usize = 20usize;
33003    fn deser(
33004        _version: MavlinkVersion,
33005        __input: &[u8],
33006    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33007        let avail_len = __input.len();
33008        let mut payload_buf = [0; Self::ENCODED_LEN];
33009        let mut buf = if avail_len < Self::ENCODED_LEN {
33010            payload_buf[0..avail_len].copy_from_slice(__input);
33011            Bytes::new(&payload_buf)
33012        } else {
33013            Bytes::new(__input)
33014        };
33015        let mut __struct = Self::default();
33016        __struct.airspeed = buf.get_f32_le();
33017        __struct.groundspeed = buf.get_f32_le();
33018        __struct.alt = buf.get_f32_le();
33019        __struct.climb = buf.get_f32_le();
33020        __struct.heading = buf.get_i16_le();
33021        __struct.throttle = buf.get_u16_le();
33022        Ok(__struct)
33023    }
33024    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33025        let mut __tmp = BytesMut::new(bytes);
33026        #[allow(clippy::absurd_extreme_comparisons)]
33027        #[allow(unused_comparisons)]
33028        if __tmp.remaining() < Self::ENCODED_LEN {
33029            panic!(
33030                "buffer is too small (need {} bytes, but got {})",
33031                Self::ENCODED_LEN,
33032                __tmp.remaining(),
33033            )
33034        }
33035        __tmp.put_f32_le(self.airspeed);
33036        __tmp.put_f32_le(self.groundspeed);
33037        __tmp.put_f32_le(self.alt);
33038        __tmp.put_f32_le(self.climb);
33039        __tmp.put_i16_le(self.heading);
33040        __tmp.put_u16_le(self.throttle);
33041        if matches!(version, MavlinkVersion::V2) {
33042            let len = __tmp.len();
33043            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33044        } else {
33045            __tmp.len()
33046        }
33047    }
33048}
33049#[doc = "Vibration levels and accelerometer clipping."]
33050#[doc = ""]
33051#[doc = "ID: 241"]
33052#[derive(Debug, Clone, PartialEq)]
33053#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33054#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33055#[cfg_attr(feature = "ts", derive(TS))]
33056#[cfg_attr(feature = "ts", ts(export))]
33057pub struct VIBRATION_DATA {
33058    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
33059    pub time_usec: u64,
33060    #[doc = "Vibration levels on X-axis"]
33061    pub vibration_x: f32,
33062    #[doc = "Vibration levels on Y-axis"]
33063    pub vibration_y: f32,
33064    #[doc = "Vibration levels on Z-axis"]
33065    pub vibration_z: f32,
33066    #[doc = "first accelerometer clipping count"]
33067    pub clipping_0: u32,
33068    #[doc = "second accelerometer clipping count"]
33069    pub clipping_1: u32,
33070    #[doc = "third accelerometer clipping count"]
33071    pub clipping_2: u32,
33072}
33073impl VIBRATION_DATA {
33074    pub const ENCODED_LEN: usize = 32usize;
33075    pub const DEFAULT: Self = Self {
33076        time_usec: 0_u64,
33077        vibration_x: 0.0_f32,
33078        vibration_y: 0.0_f32,
33079        vibration_z: 0.0_f32,
33080        clipping_0: 0_u32,
33081        clipping_1: 0_u32,
33082        clipping_2: 0_u32,
33083    };
33084    #[cfg(feature = "arbitrary")]
33085    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33086        use arbitrary::{Arbitrary, Unstructured};
33087        let mut buf = [0u8; 1024];
33088        rng.fill_bytes(&mut buf);
33089        let mut unstructured = Unstructured::new(&buf);
33090        Self::arbitrary(&mut unstructured).unwrap_or_default()
33091    }
33092}
33093impl Default for VIBRATION_DATA {
33094    fn default() -> Self {
33095        Self::DEFAULT.clone()
33096    }
33097}
33098impl MessageData for VIBRATION_DATA {
33099    type Message = MavMessage;
33100    const ID: u32 = 241u32;
33101    const NAME: &'static str = "VIBRATION";
33102    const EXTRA_CRC: u8 = 90u8;
33103    const ENCODED_LEN: usize = 32usize;
33104    fn deser(
33105        _version: MavlinkVersion,
33106        __input: &[u8],
33107    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33108        let avail_len = __input.len();
33109        let mut payload_buf = [0; Self::ENCODED_LEN];
33110        let mut buf = if avail_len < Self::ENCODED_LEN {
33111            payload_buf[0..avail_len].copy_from_slice(__input);
33112            Bytes::new(&payload_buf)
33113        } else {
33114            Bytes::new(__input)
33115        };
33116        let mut __struct = Self::default();
33117        __struct.time_usec = buf.get_u64_le();
33118        __struct.vibration_x = buf.get_f32_le();
33119        __struct.vibration_y = buf.get_f32_le();
33120        __struct.vibration_z = buf.get_f32_le();
33121        __struct.clipping_0 = buf.get_u32_le();
33122        __struct.clipping_1 = buf.get_u32_le();
33123        __struct.clipping_2 = buf.get_u32_le();
33124        Ok(__struct)
33125    }
33126    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33127        let mut __tmp = BytesMut::new(bytes);
33128        #[allow(clippy::absurd_extreme_comparisons)]
33129        #[allow(unused_comparisons)]
33130        if __tmp.remaining() < Self::ENCODED_LEN {
33131            panic!(
33132                "buffer is too small (need {} bytes, but got {})",
33133                Self::ENCODED_LEN,
33134                __tmp.remaining(),
33135            )
33136        }
33137        __tmp.put_u64_le(self.time_usec);
33138        __tmp.put_f32_le(self.vibration_x);
33139        __tmp.put_f32_le(self.vibration_y);
33140        __tmp.put_f32_le(self.vibration_z);
33141        __tmp.put_u32_le(self.clipping_0);
33142        __tmp.put_u32_le(self.clipping_1);
33143        __tmp.put_u32_le(self.clipping_2);
33144        if matches!(version, MavlinkVersion::V2) {
33145            let len = __tmp.len();
33146            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33147        } else {
33148            __tmp.len()
33149        }
33150    }
33151}
33152#[doc = "Global position estimate from a Vicon motion system source."]
33153#[doc = ""]
33154#[doc = "ID: 104"]
33155#[derive(Debug, Clone, PartialEq)]
33156#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33157#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33158#[cfg_attr(feature = "ts", derive(TS))]
33159#[cfg_attr(feature = "ts", ts(export))]
33160pub struct VICON_POSITION_ESTIMATE_DATA {
33161    #[doc = "Timestamp (UNIX time or time since system boot)"]
33162    pub usec: u64,
33163    #[doc = "Global X position"]
33164    pub x: f32,
33165    #[doc = "Global Y position"]
33166    pub y: f32,
33167    #[doc = "Global Z position"]
33168    pub z: f32,
33169    #[doc = "Roll angle"]
33170    pub roll: f32,
33171    #[doc = "Pitch angle"]
33172    pub pitch: f32,
33173    #[doc = "Yaw angle"]
33174    pub yaw: f32,
33175    #[doc = "Row-major representation of 6x6 pose cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
33176    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
33177    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
33178    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
33179    pub covariance: [f32; 21],
33180}
33181impl VICON_POSITION_ESTIMATE_DATA {
33182    pub const ENCODED_LEN: usize = 116usize;
33183    pub const DEFAULT: Self = Self {
33184        usec: 0_u64,
33185        x: 0.0_f32,
33186        y: 0.0_f32,
33187        z: 0.0_f32,
33188        roll: 0.0_f32,
33189        pitch: 0.0_f32,
33190        yaw: 0.0_f32,
33191        covariance: [0.0_f32; 21usize],
33192    };
33193    #[cfg(feature = "arbitrary")]
33194    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33195        use arbitrary::{Arbitrary, Unstructured};
33196        let mut buf = [0u8; 1024];
33197        rng.fill_bytes(&mut buf);
33198        let mut unstructured = Unstructured::new(&buf);
33199        Self::arbitrary(&mut unstructured).unwrap_or_default()
33200    }
33201}
33202impl Default for VICON_POSITION_ESTIMATE_DATA {
33203    fn default() -> Self {
33204        Self::DEFAULT.clone()
33205    }
33206}
33207impl MessageData for VICON_POSITION_ESTIMATE_DATA {
33208    type Message = MavMessage;
33209    const ID: u32 = 104u32;
33210    const NAME: &'static str = "VICON_POSITION_ESTIMATE";
33211    const EXTRA_CRC: u8 = 56u8;
33212    const ENCODED_LEN: usize = 116usize;
33213    fn deser(
33214        _version: MavlinkVersion,
33215        __input: &[u8],
33216    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33217        let avail_len = __input.len();
33218        let mut payload_buf = [0; Self::ENCODED_LEN];
33219        let mut buf = if avail_len < Self::ENCODED_LEN {
33220            payload_buf[0..avail_len].copy_from_slice(__input);
33221            Bytes::new(&payload_buf)
33222        } else {
33223            Bytes::new(__input)
33224        };
33225        let mut __struct = Self::default();
33226        __struct.usec = buf.get_u64_le();
33227        __struct.x = buf.get_f32_le();
33228        __struct.y = buf.get_f32_le();
33229        __struct.z = buf.get_f32_le();
33230        __struct.roll = buf.get_f32_le();
33231        __struct.pitch = buf.get_f32_le();
33232        __struct.yaw = buf.get_f32_le();
33233        for v in &mut __struct.covariance {
33234            let val = buf.get_f32_le();
33235            *v = val;
33236        }
33237        Ok(__struct)
33238    }
33239    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33240        let mut __tmp = BytesMut::new(bytes);
33241        #[allow(clippy::absurd_extreme_comparisons)]
33242        #[allow(unused_comparisons)]
33243        if __tmp.remaining() < Self::ENCODED_LEN {
33244            panic!(
33245                "buffer is too small (need {} bytes, but got {})",
33246                Self::ENCODED_LEN,
33247                __tmp.remaining(),
33248            )
33249        }
33250        __tmp.put_u64_le(self.usec);
33251        __tmp.put_f32_le(self.x);
33252        __tmp.put_f32_le(self.y);
33253        __tmp.put_f32_le(self.z);
33254        __tmp.put_f32_le(self.roll);
33255        __tmp.put_f32_le(self.pitch);
33256        __tmp.put_f32_le(self.yaw);
33257        if matches!(version, MavlinkVersion::V2) {
33258            for val in &self.covariance {
33259                __tmp.put_f32_le(*val);
33260            }
33261            let len = __tmp.len();
33262            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33263        } else {
33264            __tmp.len()
33265        }
33266    }
33267}
33268#[doc = "Information about video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE, where param2 indicates the video stream id: 0 for all streams, 1 for first, 2 for second, etc."]
33269#[doc = ""]
33270#[doc = "ID: 269"]
33271#[derive(Debug, Clone, PartialEq)]
33272#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33273#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33274#[cfg_attr(feature = "ts", derive(TS))]
33275#[cfg_attr(feature = "ts", ts(export))]
33276pub struct VIDEO_STREAM_INFORMATION_DATA {
33277    #[doc = "Frame rate."]
33278    pub framerate: f32,
33279    #[doc = "Bit rate."]
33280    pub bitrate: u32,
33281    #[doc = "Bitmap of stream status flags."]
33282    pub flags: VideoStreamStatusFlags,
33283    #[doc = "Horizontal resolution."]
33284    pub resolution_h: u16,
33285    #[doc = "Vertical resolution."]
33286    pub resolution_v: u16,
33287    #[doc = "Video image rotation clockwise."]
33288    pub rotation: u16,
33289    #[doc = "Horizontal Field of view."]
33290    pub hfov: u16,
33291    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
33292    pub stream_id: u8,
33293    #[doc = "Number of streams available."]
33294    pub count: u8,
33295    #[doc = "Type of stream."]
33296    pub mavtype: VideoStreamType,
33297    #[doc = "Stream name."]
33298    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
33299    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
33300    pub name: [u8; 32],
33301    #[doc = "Video stream URI (TCP or RTSP URI ground station should connect to) or port number (UDP port ground station should listen to)."]
33302    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
33303    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
33304    pub uri: [u8; 160],
33305    #[doc = "Encoding of stream."]
33306    #[cfg_attr(feature = "serde", serde(default))]
33307    pub encoding: VideoStreamEncoding,
33308    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
33309    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
33310    pub camera_device_id: u8,
33311}
33312impl VIDEO_STREAM_INFORMATION_DATA {
33313    pub const ENCODED_LEN: usize = 215usize;
33314    pub const DEFAULT: Self = Self {
33315        framerate: 0.0_f32,
33316        bitrate: 0_u32,
33317        flags: VideoStreamStatusFlags::DEFAULT,
33318        resolution_h: 0_u16,
33319        resolution_v: 0_u16,
33320        rotation: 0_u16,
33321        hfov: 0_u16,
33322        stream_id: 0_u8,
33323        count: 0_u8,
33324        mavtype: VideoStreamType::DEFAULT,
33325        name: [0_u8; 32usize],
33326        uri: [0_u8; 160usize],
33327        encoding: VideoStreamEncoding::DEFAULT,
33328        camera_device_id: 0_u8,
33329    };
33330    #[cfg(feature = "arbitrary")]
33331    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33332        use arbitrary::{Arbitrary, Unstructured};
33333        let mut buf = [0u8; 1024];
33334        rng.fill_bytes(&mut buf);
33335        let mut unstructured = Unstructured::new(&buf);
33336        Self::arbitrary(&mut unstructured).unwrap_or_default()
33337    }
33338}
33339impl Default for VIDEO_STREAM_INFORMATION_DATA {
33340    fn default() -> Self {
33341        Self::DEFAULT.clone()
33342    }
33343}
33344impl MessageData for VIDEO_STREAM_INFORMATION_DATA {
33345    type Message = MavMessage;
33346    const ID: u32 = 269u32;
33347    const NAME: &'static str = "VIDEO_STREAM_INFORMATION";
33348    const EXTRA_CRC: u8 = 109u8;
33349    const ENCODED_LEN: usize = 215usize;
33350    fn deser(
33351        _version: MavlinkVersion,
33352        __input: &[u8],
33353    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33354        let avail_len = __input.len();
33355        let mut payload_buf = [0; Self::ENCODED_LEN];
33356        let mut buf = if avail_len < Self::ENCODED_LEN {
33357            payload_buf[0..avail_len].copy_from_slice(__input);
33358            Bytes::new(&payload_buf)
33359        } else {
33360            Bytes::new(__input)
33361        };
33362        let mut __struct = Self::default();
33363        __struct.framerate = buf.get_f32_le();
33364        __struct.bitrate = buf.get_u32_le();
33365        let tmp = buf.get_u16_le();
33366        __struct.flags = VideoStreamStatusFlags::from_bits(
33367            tmp & VideoStreamStatusFlags::all().bits(),
33368        )
33369        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
33370            flag_type: "VideoStreamStatusFlags",
33371            value: tmp as u32,
33372        })?;
33373        __struct.resolution_h = buf.get_u16_le();
33374        __struct.resolution_v = buf.get_u16_le();
33375        __struct.rotation = buf.get_u16_le();
33376        __struct.hfov = buf.get_u16_le();
33377        __struct.stream_id = buf.get_u8();
33378        __struct.count = buf.get_u8();
33379        let tmp = buf.get_u8();
33380        __struct.mavtype =
33381            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
33382                enum_type: "VideoStreamType",
33383                value: tmp as u32,
33384            })?;
33385        for v in &mut __struct.name {
33386            let val = buf.get_u8();
33387            *v = val;
33388        }
33389        for v in &mut __struct.uri {
33390            let val = buf.get_u8();
33391            *v = val;
33392        }
33393        let tmp = buf.get_u8();
33394        __struct.encoding =
33395            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
33396                enum_type: "VideoStreamEncoding",
33397                value: tmp as u32,
33398            })?;
33399        __struct.camera_device_id = buf.get_u8();
33400        Ok(__struct)
33401    }
33402    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33403        let mut __tmp = BytesMut::new(bytes);
33404        #[allow(clippy::absurd_extreme_comparisons)]
33405        #[allow(unused_comparisons)]
33406        if __tmp.remaining() < Self::ENCODED_LEN {
33407            panic!(
33408                "buffer is too small (need {} bytes, but got {})",
33409                Self::ENCODED_LEN,
33410                __tmp.remaining(),
33411            )
33412        }
33413        __tmp.put_f32_le(self.framerate);
33414        __tmp.put_u32_le(self.bitrate);
33415        __tmp.put_u16_le(self.flags.bits());
33416        __tmp.put_u16_le(self.resolution_h);
33417        __tmp.put_u16_le(self.resolution_v);
33418        __tmp.put_u16_le(self.rotation);
33419        __tmp.put_u16_le(self.hfov);
33420        __tmp.put_u8(self.stream_id);
33421        __tmp.put_u8(self.count);
33422        __tmp.put_u8(self.mavtype as u8);
33423        for val in &self.name {
33424            __tmp.put_u8(*val);
33425        }
33426        for val in &self.uri {
33427            __tmp.put_u8(*val);
33428        }
33429        if matches!(version, MavlinkVersion::V2) {
33430            __tmp.put_u8(self.encoding as u8);
33431            __tmp.put_u8(self.camera_device_id);
33432            let len = __tmp.len();
33433            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33434        } else {
33435            __tmp.len()
33436        }
33437    }
33438}
33439#[doc = "Information about the status of a video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE."]
33440#[doc = ""]
33441#[doc = "ID: 270"]
33442#[derive(Debug, Clone, PartialEq)]
33443#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33444#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33445#[cfg_attr(feature = "ts", derive(TS))]
33446#[cfg_attr(feature = "ts", ts(export))]
33447pub struct VIDEO_STREAM_STATUS_DATA {
33448    #[doc = "Frame rate"]
33449    pub framerate: f32,
33450    #[doc = "Bit rate"]
33451    pub bitrate: u32,
33452    #[doc = "Bitmap of stream status flags"]
33453    pub flags: VideoStreamStatusFlags,
33454    #[doc = "Horizontal resolution"]
33455    pub resolution_h: u16,
33456    #[doc = "Vertical resolution"]
33457    pub resolution_v: u16,
33458    #[doc = "Video image rotation clockwise"]
33459    pub rotation: u16,
33460    #[doc = "Horizontal Field of view"]
33461    pub hfov: u16,
33462    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
33463    pub stream_id: u8,
33464    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
33465    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
33466    pub camera_device_id: u8,
33467}
33468impl VIDEO_STREAM_STATUS_DATA {
33469    pub const ENCODED_LEN: usize = 20usize;
33470    pub const DEFAULT: Self = Self {
33471        framerate: 0.0_f32,
33472        bitrate: 0_u32,
33473        flags: VideoStreamStatusFlags::DEFAULT,
33474        resolution_h: 0_u16,
33475        resolution_v: 0_u16,
33476        rotation: 0_u16,
33477        hfov: 0_u16,
33478        stream_id: 0_u8,
33479        camera_device_id: 0_u8,
33480    };
33481    #[cfg(feature = "arbitrary")]
33482    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33483        use arbitrary::{Arbitrary, Unstructured};
33484        let mut buf = [0u8; 1024];
33485        rng.fill_bytes(&mut buf);
33486        let mut unstructured = Unstructured::new(&buf);
33487        Self::arbitrary(&mut unstructured).unwrap_or_default()
33488    }
33489}
33490impl Default for VIDEO_STREAM_STATUS_DATA {
33491    fn default() -> Self {
33492        Self::DEFAULT.clone()
33493    }
33494}
33495impl MessageData for VIDEO_STREAM_STATUS_DATA {
33496    type Message = MavMessage;
33497    const ID: u32 = 270u32;
33498    const NAME: &'static str = "VIDEO_STREAM_STATUS";
33499    const EXTRA_CRC: u8 = 59u8;
33500    const ENCODED_LEN: usize = 20usize;
33501    fn deser(
33502        _version: MavlinkVersion,
33503        __input: &[u8],
33504    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33505        let avail_len = __input.len();
33506        let mut payload_buf = [0; Self::ENCODED_LEN];
33507        let mut buf = if avail_len < Self::ENCODED_LEN {
33508            payload_buf[0..avail_len].copy_from_slice(__input);
33509            Bytes::new(&payload_buf)
33510        } else {
33511            Bytes::new(__input)
33512        };
33513        let mut __struct = Self::default();
33514        __struct.framerate = buf.get_f32_le();
33515        __struct.bitrate = buf.get_u32_le();
33516        let tmp = buf.get_u16_le();
33517        __struct.flags = VideoStreamStatusFlags::from_bits(
33518            tmp & VideoStreamStatusFlags::all().bits(),
33519        )
33520        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
33521            flag_type: "VideoStreamStatusFlags",
33522            value: tmp as u32,
33523        })?;
33524        __struct.resolution_h = buf.get_u16_le();
33525        __struct.resolution_v = buf.get_u16_le();
33526        __struct.rotation = buf.get_u16_le();
33527        __struct.hfov = buf.get_u16_le();
33528        __struct.stream_id = buf.get_u8();
33529        __struct.camera_device_id = buf.get_u8();
33530        Ok(__struct)
33531    }
33532    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33533        let mut __tmp = BytesMut::new(bytes);
33534        #[allow(clippy::absurd_extreme_comparisons)]
33535        #[allow(unused_comparisons)]
33536        if __tmp.remaining() < Self::ENCODED_LEN {
33537            panic!(
33538                "buffer is too small (need {} bytes, but got {})",
33539                Self::ENCODED_LEN,
33540                __tmp.remaining(),
33541            )
33542        }
33543        __tmp.put_f32_le(self.framerate);
33544        __tmp.put_u32_le(self.bitrate);
33545        __tmp.put_u16_le(self.flags.bits());
33546        __tmp.put_u16_le(self.resolution_h);
33547        __tmp.put_u16_le(self.resolution_v);
33548        __tmp.put_u16_le(self.rotation);
33549        __tmp.put_u16_le(self.hfov);
33550        __tmp.put_u8(self.stream_id);
33551        if matches!(version, MavlinkVersion::V2) {
33552            __tmp.put_u8(self.camera_device_id);
33553            let len = __tmp.len();
33554            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33555        } else {
33556            __tmp.len()
33557        }
33558    }
33559}
33560#[doc = "Local position/attitude estimate from a vision source."]
33561#[doc = ""]
33562#[doc = "ID: 102"]
33563#[derive(Debug, Clone, PartialEq)]
33564#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33565#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33566#[cfg_attr(feature = "ts", derive(TS))]
33567#[cfg_attr(feature = "ts", ts(export))]
33568pub struct VISION_POSITION_ESTIMATE_DATA {
33569    #[doc = "Timestamp (UNIX time or time since system boot)"]
33570    pub usec: u64,
33571    #[doc = "Local X position"]
33572    pub x: f32,
33573    #[doc = "Local Y position"]
33574    pub y: f32,
33575    #[doc = "Local Z position"]
33576    pub z: f32,
33577    #[doc = "Roll angle"]
33578    pub roll: f32,
33579    #[doc = "Pitch angle"]
33580    pub pitch: f32,
33581    #[doc = "Yaw angle"]
33582    pub yaw: f32,
33583    #[doc = "Row-major representation of pose 6x6 cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
33584    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
33585    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
33586    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
33587    pub covariance: [f32; 21],
33588    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
33589    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
33590    pub reset_counter: u8,
33591}
33592impl VISION_POSITION_ESTIMATE_DATA {
33593    pub const ENCODED_LEN: usize = 117usize;
33594    pub const DEFAULT: Self = Self {
33595        usec: 0_u64,
33596        x: 0.0_f32,
33597        y: 0.0_f32,
33598        z: 0.0_f32,
33599        roll: 0.0_f32,
33600        pitch: 0.0_f32,
33601        yaw: 0.0_f32,
33602        covariance: [0.0_f32; 21usize],
33603        reset_counter: 0_u8,
33604    };
33605    #[cfg(feature = "arbitrary")]
33606    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33607        use arbitrary::{Arbitrary, Unstructured};
33608        let mut buf = [0u8; 1024];
33609        rng.fill_bytes(&mut buf);
33610        let mut unstructured = Unstructured::new(&buf);
33611        Self::arbitrary(&mut unstructured).unwrap_or_default()
33612    }
33613}
33614impl Default for VISION_POSITION_ESTIMATE_DATA {
33615    fn default() -> Self {
33616        Self::DEFAULT.clone()
33617    }
33618}
33619impl MessageData for VISION_POSITION_ESTIMATE_DATA {
33620    type Message = MavMessage;
33621    const ID: u32 = 102u32;
33622    const NAME: &'static str = "VISION_POSITION_ESTIMATE";
33623    const EXTRA_CRC: u8 = 158u8;
33624    const ENCODED_LEN: usize = 117usize;
33625    fn deser(
33626        _version: MavlinkVersion,
33627        __input: &[u8],
33628    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33629        let avail_len = __input.len();
33630        let mut payload_buf = [0; Self::ENCODED_LEN];
33631        let mut buf = if avail_len < Self::ENCODED_LEN {
33632            payload_buf[0..avail_len].copy_from_slice(__input);
33633            Bytes::new(&payload_buf)
33634        } else {
33635            Bytes::new(__input)
33636        };
33637        let mut __struct = Self::default();
33638        __struct.usec = buf.get_u64_le();
33639        __struct.x = buf.get_f32_le();
33640        __struct.y = buf.get_f32_le();
33641        __struct.z = buf.get_f32_le();
33642        __struct.roll = buf.get_f32_le();
33643        __struct.pitch = buf.get_f32_le();
33644        __struct.yaw = buf.get_f32_le();
33645        for v in &mut __struct.covariance {
33646            let val = buf.get_f32_le();
33647            *v = val;
33648        }
33649        __struct.reset_counter = buf.get_u8();
33650        Ok(__struct)
33651    }
33652    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33653        let mut __tmp = BytesMut::new(bytes);
33654        #[allow(clippy::absurd_extreme_comparisons)]
33655        #[allow(unused_comparisons)]
33656        if __tmp.remaining() < Self::ENCODED_LEN {
33657            panic!(
33658                "buffer is too small (need {} bytes, but got {})",
33659                Self::ENCODED_LEN,
33660                __tmp.remaining(),
33661            )
33662        }
33663        __tmp.put_u64_le(self.usec);
33664        __tmp.put_f32_le(self.x);
33665        __tmp.put_f32_le(self.y);
33666        __tmp.put_f32_le(self.z);
33667        __tmp.put_f32_le(self.roll);
33668        __tmp.put_f32_le(self.pitch);
33669        __tmp.put_f32_le(self.yaw);
33670        if matches!(version, MavlinkVersion::V2) {
33671            for val in &self.covariance {
33672                __tmp.put_f32_le(*val);
33673            }
33674            __tmp.put_u8(self.reset_counter);
33675            let len = __tmp.len();
33676            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33677        } else {
33678            __tmp.len()
33679        }
33680    }
33681}
33682#[doc = "Speed estimate from a vision source."]
33683#[doc = ""]
33684#[doc = "ID: 103"]
33685#[derive(Debug, Clone, PartialEq)]
33686#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33687#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33688#[cfg_attr(feature = "ts", derive(TS))]
33689#[cfg_attr(feature = "ts", ts(export))]
33690pub struct VISION_SPEED_ESTIMATE_DATA {
33691    #[doc = "Timestamp (UNIX time or time since system boot)"]
33692    pub usec: u64,
33693    #[doc = "Global X speed"]
33694    pub x: f32,
33695    #[doc = "Global Y speed"]
33696    pub y: f32,
33697    #[doc = "Global Z speed"]
33698    pub z: f32,
33699    #[doc = "Row-major representation of 3x3 linear velocity covariance matrix (states: vx, vy, vz; 1st three entries - 1st row, etc.). If unknown, assign NaN value to first element in the array."]
33700    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
33701    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
33702    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
33703    pub covariance: [f32; 9],
33704    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
33705    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
33706    pub reset_counter: u8,
33707}
33708impl VISION_SPEED_ESTIMATE_DATA {
33709    pub const ENCODED_LEN: usize = 57usize;
33710    pub const DEFAULT: Self = Self {
33711        usec: 0_u64,
33712        x: 0.0_f32,
33713        y: 0.0_f32,
33714        z: 0.0_f32,
33715        covariance: [0.0_f32; 9usize],
33716        reset_counter: 0_u8,
33717    };
33718    #[cfg(feature = "arbitrary")]
33719    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33720        use arbitrary::{Arbitrary, Unstructured};
33721        let mut buf = [0u8; 1024];
33722        rng.fill_bytes(&mut buf);
33723        let mut unstructured = Unstructured::new(&buf);
33724        Self::arbitrary(&mut unstructured).unwrap_or_default()
33725    }
33726}
33727impl Default for VISION_SPEED_ESTIMATE_DATA {
33728    fn default() -> Self {
33729        Self::DEFAULT.clone()
33730    }
33731}
33732impl MessageData for VISION_SPEED_ESTIMATE_DATA {
33733    type Message = MavMessage;
33734    const ID: u32 = 103u32;
33735    const NAME: &'static str = "VISION_SPEED_ESTIMATE";
33736    const EXTRA_CRC: u8 = 208u8;
33737    const ENCODED_LEN: usize = 57usize;
33738    fn deser(
33739        _version: MavlinkVersion,
33740        __input: &[u8],
33741    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33742        let avail_len = __input.len();
33743        let mut payload_buf = [0; Self::ENCODED_LEN];
33744        let mut buf = if avail_len < Self::ENCODED_LEN {
33745            payload_buf[0..avail_len].copy_from_slice(__input);
33746            Bytes::new(&payload_buf)
33747        } else {
33748            Bytes::new(__input)
33749        };
33750        let mut __struct = Self::default();
33751        __struct.usec = buf.get_u64_le();
33752        __struct.x = buf.get_f32_le();
33753        __struct.y = buf.get_f32_le();
33754        __struct.z = buf.get_f32_le();
33755        for v in &mut __struct.covariance {
33756            let val = buf.get_f32_le();
33757            *v = val;
33758        }
33759        __struct.reset_counter = buf.get_u8();
33760        Ok(__struct)
33761    }
33762    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33763        let mut __tmp = BytesMut::new(bytes);
33764        #[allow(clippy::absurd_extreme_comparisons)]
33765        #[allow(unused_comparisons)]
33766        if __tmp.remaining() < Self::ENCODED_LEN {
33767            panic!(
33768                "buffer is too small (need {} bytes, but got {})",
33769                Self::ENCODED_LEN,
33770                __tmp.remaining(),
33771            )
33772        }
33773        __tmp.put_u64_le(self.usec);
33774        __tmp.put_f32_le(self.x);
33775        __tmp.put_f32_le(self.y);
33776        __tmp.put_f32_le(self.z);
33777        if matches!(version, MavlinkVersion::V2) {
33778            for val in &self.covariance {
33779                __tmp.put_f32_le(*val);
33780            }
33781            __tmp.put_u8(self.reset_counter);
33782            let len = __tmp.len();
33783            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33784        } else {
33785            __tmp.len()
33786        }
33787    }
33788}
33789#[doc = "Cumulative distance traveled for each reported wheel."]
33790#[doc = ""]
33791#[doc = "ID: 9000"]
33792#[derive(Debug, Clone, PartialEq)]
33793#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33794#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33795#[cfg_attr(feature = "ts", derive(TS))]
33796#[cfg_attr(feature = "ts", ts(export))]
33797pub struct WHEEL_DISTANCE_DATA {
33798    #[doc = "Timestamp (synced to UNIX time or since system boot)."]
33799    pub time_usec: u64,
33800    #[doc = "Distance reported by individual wheel encoders. Forward rotations increase values, reverse rotations decrease them. Not all wheels will necessarily have wheel encoders; the mapping of encoders to wheel positions must be agreed/understood by the endpoints."]
33801    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
33802    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
33803    pub distance: [f64; 16],
33804    #[doc = "Number of wheels reported."]
33805    pub count: u8,
33806}
33807impl WHEEL_DISTANCE_DATA {
33808    pub const ENCODED_LEN: usize = 137usize;
33809    pub const DEFAULT: Self = Self {
33810        time_usec: 0_u64,
33811        distance: [0.0_f64; 16usize],
33812        count: 0_u8,
33813    };
33814    #[cfg(feature = "arbitrary")]
33815    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33816        use arbitrary::{Arbitrary, Unstructured};
33817        let mut buf = [0u8; 1024];
33818        rng.fill_bytes(&mut buf);
33819        let mut unstructured = Unstructured::new(&buf);
33820        Self::arbitrary(&mut unstructured).unwrap_or_default()
33821    }
33822}
33823impl Default for WHEEL_DISTANCE_DATA {
33824    fn default() -> Self {
33825        Self::DEFAULT.clone()
33826    }
33827}
33828impl MessageData for WHEEL_DISTANCE_DATA {
33829    type Message = MavMessage;
33830    const ID: u32 = 9000u32;
33831    const NAME: &'static str = "WHEEL_DISTANCE";
33832    const EXTRA_CRC: u8 = 113u8;
33833    const ENCODED_LEN: usize = 137usize;
33834    fn deser(
33835        _version: MavlinkVersion,
33836        __input: &[u8],
33837    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33838        let avail_len = __input.len();
33839        let mut payload_buf = [0; Self::ENCODED_LEN];
33840        let mut buf = if avail_len < Self::ENCODED_LEN {
33841            payload_buf[0..avail_len].copy_from_slice(__input);
33842            Bytes::new(&payload_buf)
33843        } else {
33844            Bytes::new(__input)
33845        };
33846        let mut __struct = Self::default();
33847        __struct.time_usec = buf.get_u64_le();
33848        for v in &mut __struct.distance {
33849            let val = buf.get_f64_le();
33850            *v = val;
33851        }
33852        __struct.count = buf.get_u8();
33853        Ok(__struct)
33854    }
33855    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33856        let mut __tmp = BytesMut::new(bytes);
33857        #[allow(clippy::absurd_extreme_comparisons)]
33858        #[allow(unused_comparisons)]
33859        if __tmp.remaining() < Self::ENCODED_LEN {
33860            panic!(
33861                "buffer is too small (need {} bytes, but got {})",
33862                Self::ENCODED_LEN,
33863                __tmp.remaining(),
33864            )
33865        }
33866        __tmp.put_u64_le(self.time_usec);
33867        for val in &self.distance {
33868            __tmp.put_f64_le(*val);
33869        }
33870        __tmp.put_u8(self.count);
33871        if matches!(version, MavlinkVersion::V2) {
33872            let len = __tmp.len();
33873            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33874        } else {
33875            __tmp.len()
33876        }
33877    }
33878}
33879#[doc = "Configure WiFi AP SSID, password, and mode. This message is re-emitted as an acknowledgement by the AP. The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
33880#[doc = ""]
33881#[doc = "ID: 299"]
33882#[derive(Debug, Clone, PartialEq)]
33883#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33884#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33885#[cfg_attr(feature = "ts", derive(TS))]
33886#[cfg_attr(feature = "ts", ts(export))]
33887pub struct WIFI_CONFIG_AP_DATA {
33888    #[doc = "Name of Wi-Fi network (SSID). Blank to leave it unchanged when setting. Current SSID when sent back as a response."]
33889    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
33890    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
33891    pub ssid: [u8; 32],
33892    #[doc = "Password. Blank for an open AP. MD5 hash when message is sent back as a response."]
33893    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
33894    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
33895    pub password: [u8; 64],
33896    #[doc = "WiFi Mode."]
33897    #[cfg_attr(feature = "serde", serde(default))]
33898    pub mode: WifiConfigApMode,
33899    #[doc = "Message acceptance response (sent back to GS)."]
33900    #[cfg_attr(feature = "serde", serde(default))]
33901    pub response: WifiConfigApResponse,
33902}
33903impl WIFI_CONFIG_AP_DATA {
33904    pub const ENCODED_LEN: usize = 98usize;
33905    pub const DEFAULT: Self = Self {
33906        ssid: [0_u8; 32usize],
33907        password: [0_u8; 64usize],
33908        mode: WifiConfigApMode::DEFAULT,
33909        response: WifiConfigApResponse::DEFAULT,
33910    };
33911    #[cfg(feature = "arbitrary")]
33912    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33913        use arbitrary::{Arbitrary, Unstructured};
33914        let mut buf = [0u8; 1024];
33915        rng.fill_bytes(&mut buf);
33916        let mut unstructured = Unstructured::new(&buf);
33917        Self::arbitrary(&mut unstructured).unwrap_or_default()
33918    }
33919}
33920impl Default for WIFI_CONFIG_AP_DATA {
33921    fn default() -> Self {
33922        Self::DEFAULT.clone()
33923    }
33924}
33925impl MessageData for WIFI_CONFIG_AP_DATA {
33926    type Message = MavMessage;
33927    const ID: u32 = 299u32;
33928    const NAME: &'static str = "WIFI_CONFIG_AP";
33929    const EXTRA_CRC: u8 = 19u8;
33930    const ENCODED_LEN: usize = 98usize;
33931    fn deser(
33932        _version: MavlinkVersion,
33933        __input: &[u8],
33934    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33935        let avail_len = __input.len();
33936        let mut payload_buf = [0; Self::ENCODED_LEN];
33937        let mut buf = if avail_len < Self::ENCODED_LEN {
33938            payload_buf[0..avail_len].copy_from_slice(__input);
33939            Bytes::new(&payload_buf)
33940        } else {
33941            Bytes::new(__input)
33942        };
33943        let mut __struct = Self::default();
33944        for v in &mut __struct.ssid {
33945            let val = buf.get_u8();
33946            *v = val;
33947        }
33948        for v in &mut __struct.password {
33949            let val = buf.get_u8();
33950            *v = val;
33951        }
33952        let tmp = buf.get_i8();
33953        __struct.mode =
33954            FromPrimitive::from_i8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
33955                enum_type: "WifiConfigApMode",
33956                value: tmp as u32,
33957            })?;
33958        let tmp = buf.get_i8();
33959        __struct.response =
33960            FromPrimitive::from_i8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
33961                enum_type: "WifiConfigApResponse",
33962                value: tmp as u32,
33963            })?;
33964        Ok(__struct)
33965    }
33966    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33967        let mut __tmp = BytesMut::new(bytes);
33968        #[allow(clippy::absurd_extreme_comparisons)]
33969        #[allow(unused_comparisons)]
33970        if __tmp.remaining() < Self::ENCODED_LEN {
33971            panic!(
33972                "buffer is too small (need {} bytes, but got {})",
33973                Self::ENCODED_LEN,
33974                __tmp.remaining(),
33975            )
33976        }
33977        for val in &self.ssid {
33978            __tmp.put_u8(*val);
33979        }
33980        for val in &self.password {
33981            __tmp.put_u8(*val);
33982        }
33983        if matches!(version, MavlinkVersion::V2) {
33984            __tmp.put_i8(self.mode as i8);
33985            __tmp.put_i8(self.response as i8);
33986            let len = __tmp.len();
33987            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33988        } else {
33989            __tmp.len()
33990        }
33991    }
33992}
33993#[doc = "Winch status."]
33994#[doc = ""]
33995#[doc = "ID: 9005"]
33996#[derive(Debug, Clone, PartialEq)]
33997#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33998#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33999#[cfg_attr(feature = "ts", derive(TS))]
34000#[cfg_attr(feature = "ts", ts(export))]
34001pub struct WINCH_STATUS_DATA {
34002    #[doc = "Timestamp (synced to UNIX time or since system boot)."]
34003    pub time_usec: u64,
34004    #[doc = "Length of line released. NaN if unknown"]
34005    pub line_length: f32,
34006    #[doc = "Speed line is being released or retracted. Positive values if being released, negative values if being retracted, NaN if unknown"]
34007    pub speed: f32,
34008    #[doc = "Tension on the line. NaN if unknown"]
34009    pub tension: f32,
34010    #[doc = "Voltage of the battery supplying the winch. NaN if unknown"]
34011    pub voltage: f32,
34012    #[doc = "Current draw from the winch. NaN if unknown"]
34013    pub current: f32,
34014    #[doc = "Status flags"]
34015    pub status: MavWinchStatusFlag,
34016    #[doc = "Temperature of the motor. INT16_MAX if unknown"]
34017    pub temperature: i16,
34018}
34019impl WINCH_STATUS_DATA {
34020    pub const ENCODED_LEN: usize = 34usize;
34021    pub const DEFAULT: Self = Self {
34022        time_usec: 0_u64,
34023        line_length: 0.0_f32,
34024        speed: 0.0_f32,
34025        tension: 0.0_f32,
34026        voltage: 0.0_f32,
34027        current: 0.0_f32,
34028        status: MavWinchStatusFlag::DEFAULT,
34029        temperature: 0_i16,
34030    };
34031    #[cfg(feature = "arbitrary")]
34032    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
34033        use arbitrary::{Arbitrary, Unstructured};
34034        let mut buf = [0u8; 1024];
34035        rng.fill_bytes(&mut buf);
34036        let mut unstructured = Unstructured::new(&buf);
34037        Self::arbitrary(&mut unstructured).unwrap_or_default()
34038    }
34039}
34040impl Default for WINCH_STATUS_DATA {
34041    fn default() -> Self {
34042        Self::DEFAULT.clone()
34043    }
34044}
34045impl MessageData for WINCH_STATUS_DATA {
34046    type Message = MavMessage;
34047    const ID: u32 = 9005u32;
34048    const NAME: &'static str = "WINCH_STATUS";
34049    const EXTRA_CRC: u8 = 117u8;
34050    const ENCODED_LEN: usize = 34usize;
34051    fn deser(
34052        _version: MavlinkVersion,
34053        __input: &[u8],
34054    ) -> Result<Self, ::mavlink_core::error::ParserError> {
34055        let avail_len = __input.len();
34056        let mut payload_buf = [0; Self::ENCODED_LEN];
34057        let mut buf = if avail_len < Self::ENCODED_LEN {
34058            payload_buf[0..avail_len].copy_from_slice(__input);
34059            Bytes::new(&payload_buf)
34060        } else {
34061            Bytes::new(__input)
34062        };
34063        let mut __struct = Self::default();
34064        __struct.time_usec = buf.get_u64_le();
34065        __struct.line_length = buf.get_f32_le();
34066        __struct.speed = buf.get_f32_le();
34067        __struct.tension = buf.get_f32_le();
34068        __struct.voltage = buf.get_f32_le();
34069        __struct.current = buf.get_f32_le();
34070        let tmp = buf.get_u32_le();
34071        __struct.status = MavWinchStatusFlag::from_bits(tmp & MavWinchStatusFlag::all().bits())
34072            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
34073                flag_type: "MavWinchStatusFlag",
34074                value: tmp as u32,
34075            })?;
34076        __struct.temperature = buf.get_i16_le();
34077        Ok(__struct)
34078    }
34079    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
34080        let mut __tmp = BytesMut::new(bytes);
34081        #[allow(clippy::absurd_extreme_comparisons)]
34082        #[allow(unused_comparisons)]
34083        if __tmp.remaining() < Self::ENCODED_LEN {
34084            panic!(
34085                "buffer is too small (need {} bytes, but got {})",
34086                Self::ENCODED_LEN,
34087                __tmp.remaining(),
34088            )
34089        }
34090        __tmp.put_u64_le(self.time_usec);
34091        __tmp.put_f32_le(self.line_length);
34092        __tmp.put_f32_le(self.speed);
34093        __tmp.put_f32_le(self.tension);
34094        __tmp.put_f32_le(self.voltage);
34095        __tmp.put_f32_le(self.current);
34096        __tmp.put_u32_le(self.status.bits());
34097        __tmp.put_i16_le(self.temperature);
34098        if matches!(version, MavlinkVersion::V2) {
34099            let len = __tmp.len();
34100            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
34101        } else {
34102            __tmp.len()
34103        }
34104    }
34105}
34106#[doc = "Wind estimate from vehicle. Note that despite the name, this message does not actually contain any covariances but instead variability and accuracy fields in terms of standard deviation (1-STD)."]
34107#[doc = ""]
34108#[doc = "ID: 231"]
34109#[derive(Debug, Clone, PartialEq)]
34110#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
34111#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
34112#[cfg_attr(feature = "ts", derive(TS))]
34113#[cfg_attr(feature = "ts", ts(export))]
34114pub struct WIND_COV_DATA {
34115    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
34116    pub time_usec: u64,
34117    #[doc = "Wind in North (NED) direction (NAN if unknown)"]
34118    pub wind_x: f32,
34119    #[doc = "Wind in East (NED) direction (NAN if unknown)"]
34120    pub wind_y: f32,
34121    #[doc = "Wind in down (NED) direction (NAN if unknown)"]
34122    pub wind_z: f32,
34123    #[doc = "Variability of wind in XY, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown)"]
34124    pub var_horiz: f32,
34125    #[doc = "Variability of wind in Z, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown)"]
34126    pub var_vert: f32,
34127    #[doc = "Altitude (MSL) that this measurement was taken at (NAN if unknown)"]
34128    pub wind_alt: f32,
34129    #[doc = "Horizontal speed 1-STD accuracy (0 if unknown)"]
34130    pub horiz_accuracy: f32,
34131    #[doc = "Vertical speed 1-STD accuracy (0 if unknown)"]
34132    pub vert_accuracy: f32,
34133}
34134impl WIND_COV_DATA {
34135    pub const ENCODED_LEN: usize = 40usize;
34136    pub const DEFAULT: Self = Self {
34137        time_usec: 0_u64,
34138        wind_x: 0.0_f32,
34139        wind_y: 0.0_f32,
34140        wind_z: 0.0_f32,
34141        var_horiz: 0.0_f32,
34142        var_vert: 0.0_f32,
34143        wind_alt: 0.0_f32,
34144        horiz_accuracy: 0.0_f32,
34145        vert_accuracy: 0.0_f32,
34146    };
34147    #[cfg(feature = "arbitrary")]
34148    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
34149        use arbitrary::{Arbitrary, Unstructured};
34150        let mut buf = [0u8; 1024];
34151        rng.fill_bytes(&mut buf);
34152        let mut unstructured = Unstructured::new(&buf);
34153        Self::arbitrary(&mut unstructured).unwrap_or_default()
34154    }
34155}
34156impl Default for WIND_COV_DATA {
34157    fn default() -> Self {
34158        Self::DEFAULT.clone()
34159    }
34160}
34161impl MessageData for WIND_COV_DATA {
34162    type Message = MavMessage;
34163    const ID: u32 = 231u32;
34164    const NAME: &'static str = "WIND_COV";
34165    const EXTRA_CRC: u8 = 105u8;
34166    const ENCODED_LEN: usize = 40usize;
34167    fn deser(
34168        _version: MavlinkVersion,
34169        __input: &[u8],
34170    ) -> Result<Self, ::mavlink_core::error::ParserError> {
34171        let avail_len = __input.len();
34172        let mut payload_buf = [0; Self::ENCODED_LEN];
34173        let mut buf = if avail_len < Self::ENCODED_LEN {
34174            payload_buf[0..avail_len].copy_from_slice(__input);
34175            Bytes::new(&payload_buf)
34176        } else {
34177            Bytes::new(__input)
34178        };
34179        let mut __struct = Self::default();
34180        __struct.time_usec = buf.get_u64_le();
34181        __struct.wind_x = buf.get_f32_le();
34182        __struct.wind_y = buf.get_f32_le();
34183        __struct.wind_z = buf.get_f32_le();
34184        __struct.var_horiz = buf.get_f32_le();
34185        __struct.var_vert = buf.get_f32_le();
34186        __struct.wind_alt = buf.get_f32_le();
34187        __struct.horiz_accuracy = buf.get_f32_le();
34188        __struct.vert_accuracy = buf.get_f32_le();
34189        Ok(__struct)
34190    }
34191    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
34192        let mut __tmp = BytesMut::new(bytes);
34193        #[allow(clippy::absurd_extreme_comparisons)]
34194        #[allow(unused_comparisons)]
34195        if __tmp.remaining() < Self::ENCODED_LEN {
34196            panic!(
34197                "buffer is too small (need {} bytes, but got {})",
34198                Self::ENCODED_LEN,
34199                __tmp.remaining(),
34200            )
34201        }
34202        __tmp.put_u64_le(self.time_usec);
34203        __tmp.put_f32_le(self.wind_x);
34204        __tmp.put_f32_le(self.wind_y);
34205        __tmp.put_f32_le(self.wind_z);
34206        __tmp.put_f32_le(self.var_horiz);
34207        __tmp.put_f32_le(self.var_vert);
34208        __tmp.put_f32_le(self.wind_alt);
34209        __tmp.put_f32_le(self.horiz_accuracy);
34210        __tmp.put_f32_le(self.vert_accuracy);
34211        if matches!(version, MavlinkVersion::V2) {
34212            let len = __tmp.len();
34213            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
34214        } else {
34215            __tmp.len()
34216        }
34217    }
34218}
34219#[derive(Clone, PartialEq, Debug)]
34220#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
34221#[cfg_attr(feature = "serde", serde(tag = "type"))]
34222#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
34223#[cfg_attr(feature = "ts", derive(TS))]
34224#[cfg_attr(feature = "ts", ts(export))]
34225#[repr(u32)]
34226pub enum MavMessage {
34227    #[doc = "Set the vehicle attitude and body angular rates."]
34228    #[doc = ""]
34229    #[doc = "ID: 140"]
34230    ACTUATOR_CONTROL_TARGET(ACTUATOR_CONTROL_TARGET_DATA),
34231    #[doc = "The raw values of the actuator outputs (e.g. on Pixhawk, from MAIN, AUX ports). This message supersedes SERVO_OUTPUT_RAW."]
34232    #[doc = ""]
34233    #[doc = "ID: 375"]
34234    ACTUATOR_OUTPUT_STATUS(ACTUATOR_OUTPUT_STATUS_DATA),
34235    #[doc = "The location and information of an ADSB vehicle."]
34236    #[doc = ""]
34237    #[doc = "ID: 246"]
34238    ADSB_VEHICLE(ADSB_VEHICLE_DATA),
34239    #[doc = "The location and information of an AIS vessel."]
34240    #[doc = ""]
34241    #[doc = "ID: 301"]
34242    AIS_VESSEL(AIS_VESSEL_DATA),
34243    #[doc = "The current system altitude."]
34244    #[doc = ""]
34245    #[doc = "ID: 141"]
34246    ALTITUDE(ALTITUDE_DATA),
34247    #[doc = "ASL-fixed-wing controller data."]
34248    #[doc = ""]
34249    #[doc = "ID: 8004"]
34250    ASLCTRL_DATA(ASLCTRL_DATA_DATA),
34251    #[doc = "ASL-fixed-wing controller debug data."]
34252    #[doc = ""]
34253    #[doc = "ID: 8005"]
34254    ASLCTRL_DEBUG(ASLCTRL_DEBUG_DATA),
34255    #[doc = "Extended state information for ASLUAVs."]
34256    #[doc = ""]
34257    #[doc = "ID: 8006"]
34258    ASLUAV_STATUS(ASLUAV_STATUS_DATA),
34259    #[doc = "Off-board controls/commands for ASLUAVs."]
34260    #[doc = ""]
34261    #[doc = "ID: 8008"]
34262    ASL_OBCTRL(ASL_OBCTRL_DATA),
34263    #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, Y-right, X-front, ZYX, intrinsic)."]
34264    #[doc = ""]
34265    #[doc = "ID: 30"]
34266    ATTITUDE(ATTITUDE_DATA),
34267    #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
34268    #[doc = ""]
34269    #[doc = "ID: 31"]
34270    ATTITUDE_QUATERNION(ATTITUDE_QUATERNION_DATA),
34271    #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
34272    #[doc = ""]
34273    #[doc = "ID: 61"]
34274    ATTITUDE_QUATERNION_COV(ATTITUDE_QUATERNION_COV_DATA),
34275    #[doc = "Reports the current commanded attitude of the vehicle as specified by the autopilot. This should match the commands sent in a SET_ATTITUDE_TARGET message if the vehicle is being controlled this way."]
34276    #[doc = ""]
34277    #[doc = "ID: 83"]
34278    ATTITUDE_TARGET(ATTITUDE_TARGET_DATA),
34279    #[doc = "Motion capture attitude and position."]
34280    #[doc = ""]
34281    #[doc = "ID: 138"]
34282    ATT_POS_MOCAP(ATT_POS_MOCAP_DATA),
34283    #[doc = "Emit an encrypted signature / key identifying this system. PLEASE NOTE: This protocol has been kept simple, so transmitting the key requires an encrypted channel for true safety."]
34284    #[doc = ""]
34285    #[doc = "ID: 7"]
34286    AUTH_KEY(AUTH_KEY_DATA),
34287    #[doc = "Low level message containing autopilot state relevant for a gimbal device. This message is to be sent from the autopilot to the gimbal device component. The data of this message are for the gimbal device's estimator corrections, in particular horizon compensation, as well as indicates autopilot control intentions, e.g. feed forward angular control in the z-axis."]
34288    #[doc = ""]
34289    #[doc = "ID: 286"]
34290    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA),
34291    #[doc = "Version and capability of autopilot software. This should be emitted in response to a request with MAV_CMD_REQUEST_MESSAGE."]
34292    #[doc = ""]
34293    #[doc = "ID: 148"]
34294    AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA),
34295    #[doc = "Information about a flight mode.          The message can be enumerated to get information for all modes, or requested for a particular mode, using MAV_CMD_REQUEST_MESSAGE.         Specify 0 in param2 to request that the message is emitted for all available modes or the specific index for just one mode.         The modes must be available/settable for the current vehicle/frame type.         Each mode should only be emitted once (even if it is both standard and custom).         Note that the current mode should be emitted in CURRENT_MODE, and that if the mode list can change then AVAILABLE_MODES_MONITOR must be emitted on first change and subsequently streamed.         See <https://mavlink.io/en/services/standard_modes.html>."]
34296    #[doc = ""]
34297    #[doc = "ID: 435"]
34298    AVAILABLE_MODES(AVAILABLE_MODES_DATA),
34299    #[doc = "A change to the sequence number indicates that the set of AVAILABLE_MODES has changed.         A receiver must re-request all available modes whenever the sequence number changes.         This is only emitted after the first change and should then be broadcast at low rate (nominally 0.3 Hz) and on change.         See <https://mavlink.io/en/services/standard_modes.html>."]
34300    #[doc = ""]
34301    #[doc = "ID: 437"]
34302    AVAILABLE_MODES_MONITOR(AVAILABLE_MODES_MONITOR_DATA),
34303    #[doc = "Battery information that is static, or requires infrequent update.         This message should requested using MAV_CMD_REQUEST_MESSAGE and/or streamed at very low rate.         BATTERY_STATUS_V2 is used for higher-rate battery status information."]
34304    #[doc = ""]
34305    #[doc = "ID: 372"]
34306    BATTERY_INFO(BATTERY_INFO_DATA),
34307    #[doc = "Battery information. Updates GCS with flight controller battery status. Smart batteries also use this message, but may additionally send BATTERY_INFO."]
34308    #[doc = ""]
34309    #[doc = "ID: 147"]
34310    BATTERY_STATUS(BATTERY_STATUS_DATA),
34311    #[doc = "Report button state change."]
34312    #[doc = ""]
34313    #[doc = "ID: 257"]
34314    BUTTON_CHANGE(BUTTON_CHANGE_DATA),
34315    #[doc = "Information about the status of a capture. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
34316    #[doc = ""]
34317    #[doc = "ID: 262"]
34318    CAMERA_CAPTURE_STATUS(CAMERA_CAPTURE_STATUS_DATA),
34319    #[doc = "Information about the field of view of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
34320    #[doc = ""]
34321    #[doc = "ID: 271"]
34322    CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA),
34323    #[doc = "Information about a captured image. This is emitted every time a message is captured.         MAV_CMD_REQUEST_MESSAGE can be used to (re)request this message for a specific sequence number or range of sequence numbers:         MAV_CMD_REQUEST_MESSAGE.param2 indicates the sequence number the first image to send, or set to -1 to send the message for all sequence numbers.         MAV_CMD_REQUEST_MESSAGE.param3 is used to specify a range of messages to send:         set to 0 (default) to send just the the message for the sequence number in param 2,         set to -1 to send the message for the sequence number in param 2 and all the following sequence numbers,         set to the sequence number of the final message in the range."]
34324    #[doc = ""]
34325    #[doc = "ID: 263"]
34326    CAMERA_IMAGE_CAPTURED(CAMERA_IMAGE_CAPTURED_DATA),
34327    #[doc = "Information about a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
34328    #[doc = ""]
34329    #[doc = "ID: 259"]
34330    CAMERA_INFORMATION(CAMERA_INFORMATION_DATA),
34331    #[doc = "Settings of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
34332    #[doc = ""]
34333    #[doc = "ID: 260"]
34334    CAMERA_SETTINGS(CAMERA_SETTINGS_DATA),
34335    #[doc = "Camera absolute thermal range. This can be streamed when the associated VIDEO_STREAM_STATUS `flag` field bit VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED is set, but a GCS may choose to only request it for the current active stream. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval (param3 indicates the stream id of the current camera, or 0 for all streams, param4 indicates the target camera_device_id for autopilot-attached cameras or 0 for MAVLink cameras)."]
34336    #[doc = ""]
34337    #[doc = "ID: 277"]
34338    CAMERA_THERMAL_RANGE(CAMERA_THERMAL_RANGE_DATA),
34339    #[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
34340    #[doc = ""]
34341    #[doc = "ID: 276"]
34342    CAMERA_TRACKING_GEO_STATUS(CAMERA_TRACKING_GEO_STATUS_DATA),
34343    #[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
34344    #[doc = ""]
34345    #[doc = "ID: 275"]
34346    CAMERA_TRACKING_IMAGE_STATUS(CAMERA_TRACKING_IMAGE_STATUS_DATA),
34347    #[doc = "Camera-IMU triggering and synchronisation message."]
34348    #[doc = ""]
34349    #[doc = "ID: 112"]
34350    CAMERA_TRIGGER(CAMERA_TRIGGER_DATA),
34351    #[doc = "A forwarded CANFD frame as requested by MAV_CMD_CAN_FORWARD. These are separated from CAN_FRAME as they need different handling (eg. TAO handling)."]
34352    #[doc = ""]
34353    #[doc = "ID: 387"]
34354    CANFD_FRAME(CANFD_FRAME_DATA),
34355    #[doc = "Modify the filter of what CAN messages to forward over the mavlink. This can be used to make CAN forwarding work well on low bandwidth links. The filtering is applied on bits 8 to 24 of the CAN id (2nd and 3rd bytes) which corresponds to the DroneCAN message ID for DroneCAN. Filters with more than 16 IDs can be constructed by sending multiple CAN_FILTER_MODIFY messages."]
34356    #[doc = ""]
34357    #[doc = "ID: 388"]
34358    CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA),
34359    #[doc = "A forwarded CAN frame as requested by MAV_CMD_CAN_FORWARD."]
34360    #[doc = ""]
34361    #[doc = "ID: 386"]
34362    CAN_FRAME(CAN_FRAME_DATA),
34363    #[doc = "Configure cellular modems.         This message is re-emitted as an acknowledgement by the modem.         The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
34364    #[doc = ""]
34365    #[doc = "ID: 336"]
34366    CELLULAR_CONFIG(CELLULAR_CONFIG_DATA),
34367    #[doc = "Report current used cellular network status."]
34368    #[doc = ""]
34369    #[doc = "ID: 334"]
34370    CELLULAR_STATUS(CELLULAR_STATUS_DATA),
34371    #[doc = "Request to control this MAV."]
34372    #[doc = ""]
34373    #[doc = "ID: 5"]
34374    CHANGE_OPERATOR_CONTROL(CHANGE_OPERATOR_CONTROL_DATA),
34375    #[doc = "Accept / deny control of this MAV."]
34376    #[doc = ""]
34377    #[doc = "ID: 6"]
34378    CHANGE_OPERATOR_CONTROL_ACK(CHANGE_OPERATOR_CONTROL_ACK_DATA),
34379    #[doc = "Information about a potential collision."]
34380    #[doc = ""]
34381    #[doc = "ID: 247"]
34382    COLLISION(COLLISION_DATA),
34383    #[doc = "Report status of a command. Includes feedback whether the command was executed. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
34384    #[doc = ""]
34385    #[doc = "ID: 77"]
34386    COMMAND_ACK(COMMAND_ACK_DATA),
34387    #[doc = "Cancel a long running command. The target system should respond with a COMMAND_ACK to the original command with result=MAV_RESULT_CANCELLED if the long running process was cancelled. If it has already completed, the cancel action can be ignored. The cancel action can be retried until some sort of acknowledgement to the original command has been received. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
34388    #[doc = ""]
34389    #[doc = "ID: 80"]
34390    COMMAND_CANCEL(COMMAND_CANCEL_DATA),
34391    #[doc = "Send a command with up to seven parameters to the MAV, where params 5 and 6 are integers and the other values are floats. This is preferred over COMMAND_LONG as it allows the MAV_FRAME to be specified for interpreting positional information, such as altitude. COMMAND_INT is also preferred when sending latitude and longitude data in params 5 and 6, as it allows for greater precision. Param 5 and 6 encode positional data as scaled integers, where the scaling depends on the actual command value. NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
34392    #[doc = ""]
34393    #[doc = "ID: 75"]
34394    COMMAND_INT(COMMAND_INT_DATA),
34395    #[doc = "Message encoding a command with parameters as scaled integers and additional metadata. Scaling depends on the actual command value."]
34396    #[doc = ""]
34397    #[doc = "ID: 223"]
34398    COMMAND_INT_STAMPED(COMMAND_INT_STAMPED_DATA),
34399    #[doc = "Send a command with up to seven parameters to the MAV. COMMAND_INT is generally preferred when sending MAV_CMD commands that include positional information; it offers higher precision and allows the MAV_FRAME to be specified (which may otherwise be ambiguous, particularly for altitude). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
34400    #[doc = ""]
34401    #[doc = "ID: 76"]
34402    COMMAND_LONG(COMMAND_LONG_DATA),
34403    #[doc = "Send a command with up to seven parameters to the MAV and additional metadata."]
34404    #[doc = ""]
34405    #[doc = "ID: 224"]
34406    COMMAND_LONG_STAMPED(COMMAND_LONG_STAMPED_DATA),
34407    #[doc = "Component information message, which may be requested using MAV_CMD_REQUEST_MESSAGE."]
34408    #[doc = ""]
34409    #[doc = "ID: 395"]
34410    #[deprecated = " See `COMPONENT_METADATA` (Deprecated since 2022-04)"]
34411    COMPONENT_INFORMATION(COMPONENT_INFORMATION_DATA),
34412    #[doc = "Basic component information data. Should be requested using MAV_CMD_REQUEST_MESSAGE on startup, or when required."]
34413    #[doc = ""]
34414    #[doc = "ID: 396"]
34415    COMPONENT_INFORMATION_BASIC(COMPONENT_INFORMATION_BASIC_DATA),
34416    #[doc = "Component metadata message, which may be requested using MAV_CMD_REQUEST_MESSAGE.          This contains the MAVLink FTP URI and CRC for the component's general metadata file.         The file must be hosted on the component, and may be xz compressed.         The file CRC can be used for file caching.          The general metadata file can be read to get the locations of other metadata files (COMP_METADATA_TYPE) and translations, which may be hosted either on the vehicle or the internet.         For more information see: <https://mavlink.io/en/services/component_information.html>.          Note: Camera components should use CAMERA_INFORMATION instead, and autopilots may use both this message and AUTOPILOT_VERSION."]
34417    #[doc = ""]
34418    #[doc = "ID: 397"]
34419    COMPONENT_METADATA(COMPONENT_METADATA_DATA),
34420    #[doc = "The smoothed, monotonic system state used to feed the control loops of the system."]
34421    #[doc = ""]
34422    #[doc = "ID: 146"]
34423    CONTROL_SYSTEM_STATE(CONTROL_SYSTEM_STATE_DATA),
34424    #[doc = "Regular broadcast for the current latest event sequence number for a component. This is used to check for dropped events."]
34425    #[doc = ""]
34426    #[doc = "ID: 411"]
34427    CURRENT_EVENT_SEQUENCE(CURRENT_EVENT_SEQUENCE_DATA),
34428    #[doc = "Get the current mode.         This should be emitted on any mode change, and broadcast at low rate (nominally 0.5 Hz).         It may be requested using MAV_CMD_REQUEST_MESSAGE.         See <https://mavlink.io/en/services/standard_modes.html>."]
34429    #[doc = ""]
34430    #[doc = "ID: 436"]
34431    CURRENT_MODE(CURRENT_MODE_DATA),
34432    #[doc = "Data stream status information."]
34433    #[doc = ""]
34434    #[doc = "ID: 67"]
34435    #[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-08)"]
34436    DATA_STREAM(DATA_STREAM_DATA),
34437    #[doc = "Handshake message to initiate, control and stop image streaming when using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
34438    #[doc = ""]
34439    #[doc = "ID: 130"]
34440    DATA_TRANSMISSION_HANDSHAKE(DATA_TRANSMISSION_HANDSHAKE_DATA),
34441    #[doc = "Send a debug value. The index is used to discriminate between values. These values show up in the plot of QGroundControl as DEBUG N."]
34442    #[doc = ""]
34443    #[doc = "ID: 254"]
34444    DEBUG(DEBUG_DATA),
34445    #[doc = "Large debug/prototyping array. The message uses the maximum available payload for data. The array_id and name fields are used to discriminate between messages in code and in user interfaces (respectively). Do not use in production code."]
34446    #[doc = ""]
34447    #[doc = "ID: 350"]
34448    DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA),
34449    #[doc = "To debug something using a named 3D vector."]
34450    #[doc = ""]
34451    #[doc = "ID: 250"]
34452    DEBUG_VECT(DEBUG_VECT_DATA),
34453    #[doc = "Distance sensor information for an onboard rangefinder."]
34454    #[doc = ""]
34455    #[doc = "ID: 132"]
34456    DISTANCE_SENSOR(DISTANCE_SENSOR_DATA),
34457    #[doc = "EFI status output."]
34458    #[doc = ""]
34459    #[doc = "ID: 225"]
34460    EFI_STATUS(EFI_STATUS_DATA),
34461    #[doc = "Extended EKF state estimates for ASLUAVs."]
34462    #[doc = ""]
34463    #[doc = "ID: 8007"]
34464    EKF_EXT(EKF_EXT_DATA),
34465    #[doc = "Data packet for images sent using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
34466    #[doc = ""]
34467    #[doc = "ID: 131"]
34468    ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA),
34469    #[doc = "ESC information for lower rate streaming. Recommended streaming rate 1Hz. See ESC_STATUS for higher-rate ESC data."]
34470    #[doc = ""]
34471    #[doc = "ID: 290"]
34472    ESC_INFO(ESC_INFO_DATA),
34473    #[doc = "ESC information for higher rate streaming. Recommended streaming rate is ~10 Hz. Information that changes more slowly is sent in ESC_INFO. It should typically only be streamed on high-bandwidth links (i.e. to a companion computer)."]
34474    #[doc = ""]
34475    #[doc = "ID: 291"]
34476    ESC_STATUS(ESC_STATUS_DATA),
34477    #[doc = "Estimator status message including flags, innovation test ratios and estimated accuracies. The flags message is an integer bitmask containing information on which EKF outputs are valid. See the ESTIMATOR_STATUS_FLAGS enum definition for further information. The innovation test ratios show the magnitude of the sensor innovation divided by the innovation check threshold. Under normal operation the innovation test ratios should be below 0.5 with occasional values up to 1.0. Values greater than 1.0 should be rare under normal operation and indicate that a measurement has been rejected by the filter. The user should be notified if an innovation test ratio greater than 1.0 is recorded. Notifications for values in the range between 0.5 and 1.0 should be optional and controllable by the user."]
34478    #[doc = ""]
34479    #[doc = "ID: 230"]
34480    ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA),
34481    #[doc = "Event message. Each new event from a particular component gets a new sequence number. The same message might be sent multiple times if (re-)requested. Most events are broadcast, some can be specific to a target component (as receivers keep track of the sequence for missed events, all events need to be broadcast. Thus we use destination_component instead of target_component)."]
34482    #[doc = ""]
34483    #[doc = "ID: 410"]
34484    EVENT(EVENT_DATA),
34485    #[doc = "Provides state for additional features."]
34486    #[doc = ""]
34487    #[doc = "ID: 245"]
34488    EXTENDED_SYS_STATE(EXTENDED_SYS_STATE_DATA),
34489    #[doc = "Status of geo-fencing. Sent in extended status stream when fencing enabled."]
34490    #[doc = ""]
34491    #[doc = "ID: 162"]
34492    FENCE_STATUS(FENCE_STATUS_DATA),
34493    #[doc = "File transfer protocol message: <https://mavlink.io/en/services/ftp.html>."]
34494    #[doc = ""]
34495    #[doc = "ID: 110"]
34496    FILE_TRANSFER_PROTOCOL(FILE_TRANSFER_PROTOCOL_DATA),
34497    #[doc = "Flight information.         This includes time since boot for arm, takeoff, and land, and a flight number.         Takeoff and landing values reset to zero on arm.         This can be requested using MAV_CMD_REQUEST_MESSAGE.         Note, some fields are misnamed - timestamps are from boot (not UTC) and the flight_uuid is a sequence number."]
34498    #[doc = ""]
34499    #[doc = "ID: 264"]
34500    FLIGHT_INFORMATION(FLIGHT_INFORMATION_DATA),
34501    #[doc = "Current motion information from a designated system."]
34502    #[doc = ""]
34503    #[doc = "ID: 144"]
34504    FOLLOW_TARGET(FOLLOW_TARGET_DATA),
34505    #[doc = "Fuel status.         This message provides \"generic\" fuel level information for  in a GCS and for triggering failsafes in an autopilot.         The fuel type and associated units for fields in this message are defined in the enum MAV_FUEL_TYPE.          The reported `consumed_fuel` and `remaining_fuel` must only be supplied if measured: they must not be inferred from the `maximum_fuel` and the other value.         A recipient can assume that if these fields are supplied they are accurate.         If not provided, the recipient can infer `remaining_fuel` from `maximum_fuel` and `consumed_fuel` on the assumption that the fuel was initially at its maximum (this is what battery monitors assume).         Note however that this is an assumption, and the UI should prompt the user appropriately (i.e. notify user that they should fill the tank before boot).          This kind of information may also be sent in fuel-specific messages such as BATTERY_STATUS_V2.         If both messages are sent for the same fuel system, the ids and corresponding information must match.          This should be streamed (nominally at 0.1 Hz)."]
34506    #[doc = ""]
34507    #[doc = "ID: 371"]
34508    FUEL_STATUS(FUEL_STATUS_DATA),
34509    #[doc = "Fixed-wing soaring (i.e. thermal seeking) data."]
34510    #[doc = ""]
34511    #[doc = "ID: 8011"]
34512    FW_SOARING_DATA(FW_SOARING_DATA_DATA),
34513    #[doc = "Telemetry of power generation system. Alternator or mechanical generator."]
34514    #[doc = ""]
34515    #[doc = "ID: 373"]
34516    GENERATOR_STATUS(GENERATOR_STATUS_DATA),
34517    #[doc = "Message reporting the status of a gimbal device. \t  This message should be broadcast by a gimbal device component at a low regular rate (e.g. 5 Hz). \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Other conditions of the flags are not allowed. \t  The quaternion and angular velocities in the other frame can be calculated from delta_yaw and delta_yaw_velocity as \t  q_earth = q_delta_yaw * q_vehicle and w_earth = w_delta_yaw_velocity + w_vehicle (if not NaN). \t  If neither the GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME nor the GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME flag is set, \t  then (for backwards compatibility) the data in the delta_yaw and delta_yaw_velocity fields are to be ignored. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME, \t  and always should set delta_yaw and delta_yaw_velocity either to the proper value or NaN."]
34518    #[doc = ""]
34519    #[doc = "ID: 285"]
34520    GIMBAL_DEVICE_ATTITUDE_STATUS(GIMBAL_DEVICE_ATTITUDE_STATUS_DATA),
34521    #[doc = "Information about a low level gimbal. This message should be requested by the gimbal manager or a ground station using MAV_CMD_REQUEST_MESSAGE. The maximum angles and rates are the limits by hardware. However, the limits by software used are likely different/smaller and dependent on mode/settings/etc.."]
34522    #[doc = ""]
34523    #[doc = "ID: 283"]
34524    GIMBAL_DEVICE_INFORMATION(GIMBAL_DEVICE_INFORMATION_DATA),
34525    #[doc = "Low level message to control a gimbal device's attitude. \t  This message is to be sent from the gimbal manager to the gimbal device component. \t  The quaternion and angular velocities can be set to NaN according to use case. \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Setting both GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME and GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is not allowed. \t  These rules are to ensure backwards compatibility. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."]
34526    #[doc = ""]
34527    #[doc = "ID: 284"]
34528    GIMBAL_DEVICE_SET_ATTITUDE(GIMBAL_DEVICE_SET_ATTITUDE_DATA),
34529    #[doc = "Information about a high level gimbal manager. This message should be requested by a ground station using MAV_CMD_REQUEST_MESSAGE."]
34530    #[doc = ""]
34531    #[doc = "ID: 280"]
34532    GIMBAL_MANAGER_INFORMATION(GIMBAL_MANAGER_INFORMATION_DATA),
34533    #[doc = "High level message to control a gimbal's attitude. This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
34534    #[doc = ""]
34535    #[doc = "ID: 282"]
34536    GIMBAL_MANAGER_SET_ATTITUDE(GIMBAL_MANAGER_SET_ATTITUDE_DATA),
34537    #[doc = "High level message to control a gimbal manually. The angles or angular rates are unitless; the actual rates will depend on internal gimbal manager settings/configuration (e.g. set by parameters). This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
34538    #[doc = ""]
34539    #[doc = "ID: 288"]
34540    GIMBAL_MANAGER_SET_MANUAL_CONTROL(GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA),
34541    #[doc = "Set gimbal manager pitch and yaw angles (high rate message). This message is to be sent to the gimbal manager (e.g. from a ground station) and will be ignored by gimbal devices. Angles and rates can be set to NaN according to use case. Use MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW for low-rate adjustments that require confirmation."]
34542    #[doc = ""]
34543    #[doc = "ID: 287"]
34544    GIMBAL_MANAGER_SET_PITCHYAW(GIMBAL_MANAGER_SET_PITCHYAW_DATA),
34545    #[doc = "Current status about a high level gimbal manager. This message should be broadcast at a low regular rate (e.g. 5Hz)."]
34546    #[doc = ""]
34547    #[doc = "ID: 281"]
34548    GIMBAL_MANAGER_STATUS(GIMBAL_MANAGER_STATUS_DATA),
34549    #[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It                is designed as scaled integer message since the resolution of float is not sufficient."]
34550    #[doc = ""]
34551    #[doc = "ID: 33"]
34552    GLOBAL_POSITION_INT(GLOBAL_POSITION_INT_DATA),
34553    #[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It  is designed as scaled integer message since the resolution of float is not sufficient. NOTE: This message is intended for onboard networks / companion computers and higher-bandwidth links and optimized for accuracy and completeness. Please use the GLOBAL_POSITION_INT message for a minimal subset."]
34554    #[doc = ""]
34555    #[doc = "ID: 63"]
34556    GLOBAL_POSITION_INT_COV(GLOBAL_POSITION_INT_COV_DATA),
34557    #[doc = "Global position/attitude estimate from a vision source."]
34558    #[doc = ""]
34559    #[doc = "ID: 101"]
34560    GLOBAL_VISION_POSITION_ESTIMATE(GLOBAL_VISION_POSITION_ESTIMATE_DATA),
34561    #[doc = "Second GPS data."]
34562    #[doc = ""]
34563    #[doc = "ID: 124"]
34564    GPS2_RAW(GPS2_RAW_DATA),
34565    #[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
34566    #[doc = ""]
34567    #[doc = "ID: 128"]
34568    GPS2_RTK(GPS2_RTK_DATA),
34569    #[doc = "Publishes the GPS coordinates of the vehicle local origin (0,0,0) position. Emitted whenever a new GPS-Local position mapping is requested or set - e.g. following SET_GPS_GLOBAL_ORIGIN message."]
34570    #[doc = ""]
34571    #[doc = "ID: 49"]
34572    GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA),
34573    #[doc = "Data for injecting into the onboard GPS (used for DGPS)."]
34574    #[doc = ""]
34575    #[doc = "ID: 123"]
34576    #[deprecated = " See `GPS_RTCM_DATA` (Deprecated since 2022-05)"]
34577    GPS_INJECT_DATA(GPS_INJECT_DATA_DATA),
34578    #[doc = "GPS sensor input message.  This is a raw sensor value sent by the GPS. This is NOT the global position estimate of the system."]
34579    #[doc = ""]
34580    #[doc = "ID: 232"]
34581    GPS_INPUT(GPS_INPUT_DATA),
34582    #[doc = "The global position, as returned by the Global Positioning System (GPS). This is                 NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
34583    #[doc = ""]
34584    #[doc = "ID: 24"]
34585    GPS_RAW_INT(GPS_RAW_INT_DATA),
34586    #[doc = "RTCM message for injecting into the onboard GPS (used for DGPS)."]
34587    #[doc = ""]
34588    #[doc = "ID: 233"]
34589    GPS_RTCM_DATA(GPS_RTCM_DATA_DATA),
34590    #[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
34591    #[doc = ""]
34592    #[doc = "ID: 127"]
34593    GPS_RTK(GPS_RTK_DATA),
34594    #[doc = "The positioning status, as reported by GPS. This message is intended to display status information about each satellite visible to the receiver. See message GLOBAL_POSITION_INT for the global position estimate. This message can contain information for up to 20 satellites."]
34595    #[doc = ""]
34596    #[doc = "ID: 25"]
34597    GPS_STATUS(GPS_STATUS_DATA),
34598    #[doc = "Status of GSM modem (connected to onboard computer)."]
34599    #[doc = ""]
34600    #[doc = "ID: 8014"]
34601    GSM_LINK_STATUS(GSM_LINK_STATUS_DATA),
34602    #[doc = "The heartbeat message shows that a system or component is present and responding. The type and autopilot fields (along with the message component id), allow the receiving system to treat further messages from this system appropriately (e.g. by laying out the user interface based on the autopilot). This microservice is documented at <https://mavlink.io/en/services/heartbeat.html>."]
34603    #[doc = ""]
34604    #[doc = "ID: 0"]
34605    HEARTBEAT(HEARTBEAT_DATA),
34606    #[doc = "The IMU readings in SI units in NED body frame."]
34607    #[doc = ""]
34608    #[doc = "ID: 105"]
34609    HIGHRES_IMU(HIGHRES_IMU_DATA),
34610    #[doc = "Message appropriate for high latency connections like Iridium."]
34611    #[doc = ""]
34612    #[doc = "ID: 234"]
34613    #[deprecated = " See `HIGH_LATENCY2` (Deprecated since 2020-10)"]
34614    HIGH_LATENCY(HIGH_LATENCY_DATA),
34615    #[doc = "Message appropriate for high latency connections like Iridium (version 2)."]
34616    #[doc = ""]
34617    #[doc = "ID: 235"]
34618    HIGH_LATENCY2(HIGH_LATENCY2_DATA),
34619    #[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_CONTROLS."]
34620    #[doc = ""]
34621    #[doc = "ID: 93"]
34622    HIL_ACTUATOR_CONTROLS(HIL_ACTUATOR_CONTROLS_DATA),
34623    #[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_ACTUATOR_CONTROLS."]
34624    #[doc = ""]
34625    #[doc = "ID: 91"]
34626    HIL_CONTROLS(HIL_CONTROLS_DATA),
34627    #[doc = "The global position, as returned by the Global Positioning System (GPS). This is                  NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
34628    #[doc = ""]
34629    #[doc = "ID: 113"]
34630    HIL_GPS(HIL_GPS_DATA),
34631    #[doc = "Simulated optical flow from a flow sensor (e.g. PX4FLOW or optical mouse sensor)."]
34632    #[doc = ""]
34633    #[doc = "ID: 114"]
34634    HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA),
34635    #[doc = "Sent from simulation to autopilot. The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification."]
34636    #[doc = ""]
34637    #[doc = "ID: 92"]
34638    HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA),
34639    #[doc = "The IMU readings in SI units in NED body frame."]
34640    #[doc = ""]
34641    #[doc = "ID: 107"]
34642    HIL_SENSOR(HIL_SENSOR_DATA),
34643    #[doc = "Sent from simulation to autopilot. This packet is useful for high throughput applications such as hardware in the loop simulations."]
34644    #[doc = ""]
34645    #[doc = "ID: 90"]
34646    #[deprecated = "Suffers from missing airspeed fields and singularities due to Euler angles. See `HIL_STATE_QUATERNION` (Deprecated since 2013-07)"]
34647    HIL_STATE(HIL_STATE_DATA),
34648    #[doc = "Sent from simulation to autopilot, avoids in contrast to HIL_STATE singularities. This packet is useful for high throughput applications such as hardware in the loop simulations."]
34649    #[doc = ""]
34650    #[doc = "ID: 115"]
34651    HIL_STATE_QUATERNION(HIL_STATE_QUATERNION_DATA),
34652    #[doc = "Contains the home position. \tThe home position is the default position that the system will return to and land on. \tThe position must be set automatically by the system during the takeoff, and may also be explicitly set using MAV_CMD_DO_SET_HOME. \tThe global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface. \tUnder normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach. \tThe approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: this message can be requested by sending the MAV_CMD_REQUEST_MESSAGE with param1=242 (or the deprecated MAV_CMD_GET_HOME_POSITION command)."]
34653    #[doc = ""]
34654    #[doc = "ID: 242"]
34655    HOME_POSITION(HOME_POSITION_DATA),
34656    #[doc = "Temperature and humidity from hygrometer."]
34657    #[doc = ""]
34658    #[doc = "ID: 12920"]
34659    HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA),
34660    #[doc = "Illuminator status."]
34661    #[doc = ""]
34662    #[doc = "ID: 440"]
34663    ILLUMINATOR_STATUS(ILLUMINATOR_STATUS_DATA),
34664    #[doc = "Status of the Iridium SBD link."]
34665    #[doc = ""]
34666    #[doc = "ID: 335"]
34667    ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA),
34668    #[doc = "The location of a landing target. See: <https://mavlink.io/en/services/landing_target.html>."]
34669    #[doc = ""]
34670    #[doc = "ID: 149"]
34671    LANDING_TARGET(LANDING_TARGET_DATA),
34672    #[doc = "Status generated in each node in the communication chain and injected into MAVLink stream."]
34673    #[doc = ""]
34674    #[doc = "ID: 8"]
34675    LINK_NODE_STATUS(LINK_NODE_STATUS_DATA),
34676    #[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
34677    #[doc = ""]
34678    #[doc = "ID: 32"]
34679    LOCAL_POSITION_NED(LOCAL_POSITION_NED_DATA),
34680    #[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
34681    #[doc = ""]
34682    #[doc = "ID: 64"]
34683    LOCAL_POSITION_NED_COV(LOCAL_POSITION_NED_COV_DATA),
34684    #[doc = "The offset in X, Y, Z and yaw between the LOCAL_POSITION_NED messages of MAV X and the global coordinate frame in NED coordinates. Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
34685    #[doc = ""]
34686    #[doc = "ID: 89"]
34687    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA),
34688    #[doc = "An ack for a LOGGING_DATA_ACKED message."]
34689    #[doc = ""]
34690    #[doc = "ID: 268"]
34691    LOGGING_ACK(LOGGING_ACK_DATA),
34692    #[doc = "A message containing logged data (see also MAV_CMD_LOGGING_START)."]
34693    #[doc = ""]
34694    #[doc = "ID: 266"]
34695    LOGGING_DATA(LOGGING_DATA_DATA),
34696    #[doc = "A message containing logged data which requires a LOGGING_ACK to be sent back."]
34697    #[doc = ""]
34698    #[doc = "ID: 267"]
34699    LOGGING_DATA_ACKED(LOGGING_DATA_ACKED_DATA),
34700    #[doc = "Reply to LOG_REQUEST_DATA."]
34701    #[doc = ""]
34702    #[doc = "ID: 120"]
34703    LOG_DATA(LOG_DATA_DATA),
34704    #[doc = "Reply to LOG_REQUEST_LIST."]
34705    #[doc = ""]
34706    #[doc = "ID: 118"]
34707    LOG_ENTRY(LOG_ENTRY_DATA),
34708    #[doc = "Erase all logs."]
34709    #[doc = ""]
34710    #[doc = "ID: 121"]
34711    LOG_ERASE(LOG_ERASE_DATA),
34712    #[doc = "Request a chunk of a log."]
34713    #[doc = ""]
34714    #[doc = "ID: 119"]
34715    LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA),
34716    #[doc = "Stop log transfer and resume normal logging."]
34717    #[doc = ""]
34718    #[doc = "ID: 122"]
34719    LOG_REQUEST_END(LOG_REQUEST_END_DATA),
34720    #[doc = "Request a list of available logs. On some systems calling this may stop on-board logging until LOG_REQUEST_END is called. If there are no log files available this request shall be answered with one LOG_ENTRY message with id = 0 and num_logs = 0."]
34721    #[doc = ""]
34722    #[doc = "ID: 117"]
34723    LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA),
34724    #[doc = "Reports results of completed compass calibration. Sent until MAG_CAL_ACK received."]
34725    #[doc = ""]
34726    #[doc = "ID: 192"]
34727    MAG_CAL_REPORT(MAG_CAL_REPORT_DATA),
34728    #[doc = "This message provides an API for manually controlling the vehicle using standard joystick axes nomenclature, along with a joystick-like input device. Unused axes can be disabled and buttons states are transmitted as individual on/off bits of a bitmask."]
34729    #[doc = ""]
34730    #[doc = "ID: 69"]
34731    MANUAL_CONTROL(MANUAL_CONTROL_DATA),
34732    #[doc = "Setpoint in roll, pitch, yaw and thrust from the operator."]
34733    #[doc = ""]
34734    #[doc = "ID: 81"]
34735    MANUAL_SETPOINT(MANUAL_SETPOINT_DATA),
34736    #[doc = "Send raw controller memory. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
34737    #[doc = ""]
34738    #[doc = "ID: 249"]
34739    MEMORY_VECT(MEMORY_VECT_DATA),
34740    #[doc = "The interval between messages for a particular MAVLink message ID.         This message is sent in response to the MAV_CMD_REQUEST_MESSAGE command with param1=244 (this message) and param2=message_id (the id of the message for which the interval is required). \tIt may also be sent in response to MAV_CMD_GET_MESSAGE_INTERVAL. \tThis interface replaces DATA_STREAM."]
34741    #[doc = ""]
34742    #[doc = "ID: 244"]
34743    MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA),
34744    #[doc = "Acknowledgment message during waypoint handling. The type field states if this message is a positive ack (type=0) or if an error happened (type=non-zero)."]
34745    #[doc = ""]
34746    #[doc = "ID: 47"]
34747    MISSION_ACK(MISSION_ACK_DATA),
34748    #[doc = "Delete all mission items at once."]
34749    #[doc = ""]
34750    #[doc = "ID: 45"]
34751    MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA),
34752    #[doc = "This message is emitted as response to MISSION_REQUEST_LIST by the MAV and to initiate a write transaction. The GCS can then request the individual mission item based on the knowledge of the total number of waypoints."]
34753    #[doc = ""]
34754    #[doc = "ID: 44"]
34755    MISSION_COUNT(MISSION_COUNT_DATA),
34756    #[doc = "Message that announces the sequence number of the current target mission item (that the system will fly towards/execute when the mission is running).         This message should be streamed all the time (nominally at 1Hz).         This message should be emitted following a call to MAV_CMD_DO_SET_MISSION_CURRENT or MISSION_SET_CURRENT."]
34757    #[doc = ""]
34758    #[doc = "ID: 42"]
34759    MISSION_CURRENT(MISSION_CURRENT_DATA),
34760    #[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN may be used to indicate an optional/default value (e.g. to use the system's current latitude or yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
34761    #[doc = ""]
34762    #[doc = "ID: 39"]
34763    #[deprecated = " See `MISSION_ITEM_INT` (Deprecated since 2020-06)"]
34764    MISSION_ITEM(MISSION_ITEM_DATA),
34765    #[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
34766    #[doc = ""]
34767    #[doc = "ID: 73"]
34768    MISSION_ITEM_INT(MISSION_ITEM_INT_DATA),
34769    #[doc = "A certain mission item has been reached. The system will either hold this position (or circle on the orbit) or (if the autocontinue on the WP was set) continue to the next waypoint."]
34770    #[doc = ""]
34771    #[doc = "ID: 46"]
34772    MISSION_ITEM_REACHED(MISSION_ITEM_REACHED_DATA),
34773    #[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM message. <https://mavlink.io/en/services/mission.html>."]
34774    #[doc = ""]
34775    #[doc = "ID: 40"]
34776    #[deprecated = "A system that gets this request should respond with MISSION_ITEM_INT (as though MISSION_REQUEST_INT was received). See `MISSION_REQUEST_INT` (Deprecated since 2020-06)"]
34777    MISSION_REQUEST(MISSION_REQUEST_DATA),
34778    #[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM_INT message. <https://mavlink.io/en/services/mission.html>."]
34779    #[doc = ""]
34780    #[doc = "ID: 51"]
34781    MISSION_REQUEST_INT(MISSION_REQUEST_INT_DATA),
34782    #[doc = "Request the overall list of mission items from the system/component."]
34783    #[doc = ""]
34784    #[doc = "ID: 43"]
34785    MISSION_REQUEST_LIST(MISSION_REQUEST_LIST_DATA),
34786    #[doc = "Request a partial list of mission items from the system/component. <https://mavlink.io/en/services/mission.html>. If start and end index are the same, just send one waypoint."]
34787    #[doc = ""]
34788    #[doc = "ID: 37"]
34789    MISSION_REQUEST_PARTIAL_LIST(MISSION_REQUEST_PARTIAL_LIST_DATA),
34790    #[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).         If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items.         Note that mission jump repeat counters are not reset (see MAV_CMD_DO_JUMP param2).          This message may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.         If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.         If the system is not in mission mode this message must not trigger a switch to mission mode."]
34791    #[doc = ""]
34792    #[doc = "ID: 41"]
34793    #[deprecated = " See `MAV_CMD_DO_SET_MISSION_CURRENT` (Deprecated since 2022-08)"]
34794    MISSION_SET_CURRENT(MISSION_SET_CURRENT_DATA),
34795    #[doc = "This message is sent to the MAV to write a partial list. If start index == end index, only one item will be transmitted / updated. If the start index is NOT 0 and above the current list size, this request should be REJECTED!."]
34796    #[doc = ""]
34797    #[doc = "ID: 38"]
34798    MISSION_WRITE_PARTIAL_LIST(MISSION_WRITE_PARTIAL_LIST_DATA),
34799    #[doc = "Orientation of a mount."]
34800    #[doc = ""]
34801    #[doc = "ID: 265"]
34802    #[deprecated = "This message is being superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
34803    MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA),
34804    #[doc = "Send a key-value pair as float. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
34805    #[doc = ""]
34806    #[doc = "ID: 251"]
34807    NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA),
34808    #[doc = "Send a key-value pair as integer. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
34809    #[doc = ""]
34810    #[doc = "ID: 252"]
34811    NAMED_VALUE_INT(NAMED_VALUE_INT_DATA),
34812    #[doc = "The state of the navigation and position controller."]
34813    #[doc = ""]
34814    #[doc = "ID: 62"]
34815    NAV_CONTROLLER_OUTPUT(NAV_CONTROLLER_OUTPUT_DATA),
34816    #[doc = "Obstacle distances in front of the sensor, starting from the left in increment degrees to the right."]
34817    #[doc = ""]
34818    #[doc = "ID: 330"]
34819    OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA),
34820    #[doc = "Odometry message to communicate odometry information with an external interface. Fits ROS REP 147 standard for aerial vehicles (<http://www.ros.org/reps/rep-0147.html>)."]
34821    #[doc = ""]
34822    #[doc = "ID: 331"]
34823    ODOMETRY(ODOMETRY_DATA),
34824    #[doc = "Hardware status sent by an onboard computer."]
34825    #[doc = ""]
34826    #[doc = "ID: 390"]
34827    ONBOARD_COMPUTER_STATUS(ONBOARD_COMPUTER_STATUS_DATA),
34828    #[doc = "Transmitter (remote ID system) is enabled and ready to start sending location and other required information. This is streamed by transmitter. A flight controller uses it as a condition to arm."]
34829    #[doc = ""]
34830    #[doc = "ID: 12918"]
34831    OPEN_DRONE_ID_ARM_STATUS(OPEN_DRONE_ID_ARM_STATUS_DATA),
34832    #[doc = "Data for filling the OpenDroneID Authentication message. The Authentication Message defines a field that can provide a means of authenticity for the identity of the UAS (Unmanned Aircraft System). The Authentication message can have two different formats. For data page 0, the fields PageCount, Length and TimeStamp are present and AuthData is only 17 bytes. For data page 1 through 15, PageCount, Length and TimeStamp are not present and the size of AuthData is 23 bytes."]
34833    #[doc = ""]
34834    #[doc = "ID: 12902"]
34835    OPEN_DRONE_ID_AUTHENTICATION(OPEN_DRONE_ID_AUTHENTICATION_DATA),
34836    #[doc = "Data for filling the OpenDroneID Basic ID message. This and the below messages are primarily meant for feeding data to/from an OpenDroneID implementation. E.g. <https://github.com/opendroneid/opendroneid-core-c>. These messages are compatible with the ASTM F3411 Remote ID standard and the ASD-STAN prEN 4709-002 Direct Remote ID standard. Additional information and usage of these messages is documented at <https://mavlink.io/en/services/opendroneid.html>."]
34837    #[doc = ""]
34838    #[doc = "ID: 12900"]
34839    OPEN_DRONE_ID_BASIC_ID(OPEN_DRONE_ID_BASIC_ID_DATA),
34840    #[doc = "Data for filling the OpenDroneID Location message. The float data types are 32-bit IEEE 754. The Location message provides the location, altitude, direction and speed of the aircraft."]
34841    #[doc = ""]
34842    #[doc = "ID: 12901"]
34843    OPEN_DRONE_ID_LOCATION(OPEN_DRONE_ID_LOCATION_DATA),
34844    #[doc = "An OpenDroneID message pack is a container for multiple encoded OpenDroneID messages (i.e. not in the format given for the above message descriptions but after encoding into the compressed OpenDroneID byte format). Used e.g. when transmitting on Bluetooth 5.0 Long Range/Extended Advertising or on WiFi Neighbor Aware Networking or on WiFi Beacon."]
34845    #[doc = ""]
34846    #[doc = "ID: 12915"]
34847    OPEN_DRONE_ID_MESSAGE_PACK(OPEN_DRONE_ID_MESSAGE_PACK_DATA),
34848    #[doc = "Data for filling the OpenDroneID Operator ID message, which contains the CAA (Civil Aviation Authority) issued operator ID."]
34849    #[doc = ""]
34850    #[doc = "ID: 12905"]
34851    OPEN_DRONE_ID_OPERATOR_ID(OPEN_DRONE_ID_OPERATOR_ID_DATA),
34852    #[doc = "Data for filling the OpenDroneID Self ID message. The Self ID Message is an opportunity for the operator to (optionally) declare their identity and purpose of the flight. This message can provide additional information that could reduce the threat profile of a UA (Unmanned Aircraft) flying in a particular area or manner. This message can also be used to provide optional additional clarification in an emergency/remote ID system failure situation."]
34853    #[doc = ""]
34854    #[doc = "ID: 12903"]
34855    OPEN_DRONE_ID_SELF_ID(OPEN_DRONE_ID_SELF_ID_DATA),
34856    #[doc = "Data for filling the OpenDroneID System message. The System Message contains general system information including the operator location/altitude and possible aircraft group and/or category/class information."]
34857    #[doc = ""]
34858    #[doc = "ID: 12904"]
34859    OPEN_DRONE_ID_SYSTEM(OPEN_DRONE_ID_SYSTEM_DATA),
34860    #[doc = "Update the data in the OPEN_DRONE_ID_SYSTEM message with new location information. This can be sent to update the location information for the operator when no other information in the SYSTEM message has changed. This message allows for efficient operation on radio links which have limited uplink bandwidth while meeting requirements for update frequency of the operator location."]
34861    #[doc = ""]
34862    #[doc = "ID: 12919"]
34863    OPEN_DRONE_ID_SYSTEM_UPDATE(OPEN_DRONE_ID_SYSTEM_UPDATE_DATA),
34864    #[doc = "Optical flow from a flow sensor (e.g. optical mouse sensor)."]
34865    #[doc = ""]
34866    #[doc = "ID: 100"]
34867    OPTICAL_FLOW(OPTICAL_FLOW_DATA),
34868    #[doc = "Optical flow from an angular rate flow sensor (e.g. PX4FLOW or mouse sensor)."]
34869    #[doc = ""]
34870    #[doc = "ID: 106"]
34871    OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA),
34872    #[doc = "Vehicle status report that is sent out while orbit execution is in progress (see MAV_CMD_DO_ORBIT)."]
34873    #[doc = ""]
34874    #[doc = "ID: 360"]
34875    ORBIT_EXECUTION_STATUS(ORBIT_EXECUTION_STATUS_DATA),
34876    #[doc = "Response from a PARAM_EXT_SET message."]
34877    #[doc = ""]
34878    #[doc = "ID: 324"]
34879    PARAM_EXT_ACK(PARAM_EXT_ACK_DATA),
34880    #[doc = "Request all parameters of this component. All parameters should be emitted in response as PARAM_EXT_VALUE."]
34881    #[doc = ""]
34882    #[doc = "ID: 321"]
34883    PARAM_EXT_REQUEST_LIST(PARAM_EXT_REQUEST_LIST_DATA),
34884    #[doc = "Request to read the value of a parameter with either the param_id string id or param_index. PARAM_EXT_VALUE should be emitted in response."]
34885    #[doc = ""]
34886    #[doc = "ID: 320"]
34887    PARAM_EXT_REQUEST_READ(PARAM_EXT_REQUEST_READ_DATA),
34888    #[doc = "Set a parameter value. In order to deal with message loss (and retransmission of PARAM_EXT_SET), when setting a parameter value and the new value is the same as the current value, you will immediately get a PARAM_ACK_ACCEPTED response. If the current state is PARAM_ACK_IN_PROGRESS, you will accordingly receive a PARAM_ACK_IN_PROGRESS in response."]
34889    #[doc = ""]
34890    #[doc = "ID: 323"]
34891    PARAM_EXT_SET(PARAM_EXT_SET_DATA),
34892    #[doc = "Emit the value of a parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows them to re-request missing parameters after a loss or timeout."]
34893    #[doc = ""]
34894    #[doc = "ID: 322"]
34895    PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA),
34896    #[doc = "Bind a RC channel to a parameter. The parameter should change according to the RC channel value."]
34897    #[doc = ""]
34898    #[doc = "ID: 50"]
34899    PARAM_MAP_RC(PARAM_MAP_RC_DATA),
34900    #[doc = "Request all parameters of this component. After this request, all parameters are emitted. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
34901    #[doc = ""]
34902    #[doc = "ID: 21"]
34903    PARAM_REQUEST_LIST(PARAM_REQUEST_LIST_DATA),
34904    #[doc = "value[float]. This allows to send a parameter to any other component (such as the GCS) without the need of previous knowledge of possible parameter names. Thus the same GCS can store different parameters for different autopilots. See also <https://mavlink.io/en/services/parameter.html> for a full documentation of QGroundControl and IMU code."]
34905    #[doc = ""]
34906    #[doc = "ID: 20"]
34907    PARAM_REQUEST_READ(PARAM_REQUEST_READ_DATA),
34908    #[doc = "Set a parameter value (write new value to permanent storage).         The receiving component should acknowledge the new parameter value by broadcasting a PARAM_VALUE message (broadcasting ensures that multiple GCS all have an up-to-date list of all parameters). If the sending GCS did not receive a PARAM_VALUE within its timeout time, it should re-send the PARAM_SET message. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
34909    #[doc = ""]
34910    #[doc = "ID: 23"]
34911    PARAM_SET(PARAM_SET_DATA),
34912    #[doc = "Emit the value of a onboard parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows him to re-request missing parameters after a loss or timeout. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
34913    #[doc = ""]
34914    #[doc = "ID: 22"]
34915    PARAM_VALUE(PARAM_VALUE_DATA),
34916    #[doc = "A ping message either requesting or responding to a ping. This allows to measure the system latencies, including serial port, radio modem and UDP connections. The ping microservice is documented at <https://mavlink.io/en/services/ping.html>."]
34917    #[doc = ""]
34918    #[doc = "ID: 4"]
34919    #[deprecated = "To be removed / merged with TIMESYNC. See `TIMESYNC` (Deprecated since 2011-08)"]
34920    PING(PING_DATA),
34921    #[doc = "Control vehicle tone generation (buzzer)."]
34922    #[doc = ""]
34923    #[doc = "ID: 258"]
34924    #[deprecated = "New version explicitly defines format. More interoperable. See `PLAY_TUNE_V2` (Deprecated since 2019-10)"]
34925    PLAY_TUNE(PLAY_TUNE_DATA),
34926    #[doc = "Play vehicle tone/tune (buzzer). Supersedes message PLAY_TUNE."]
34927    #[doc = ""]
34928    #[doc = "ID: 400"]
34929    PLAY_TUNE_V2(PLAY_TUNE_V2_DATA),
34930    #[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_GLOBAL_INT if the vehicle is being controlled this way."]
34931    #[doc = ""]
34932    #[doc = "ID: 87"]
34933    POSITION_TARGET_GLOBAL_INT(POSITION_TARGET_GLOBAL_INT_DATA),
34934    #[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_LOCAL_NED if the vehicle is being controlled this way."]
34935    #[doc = ""]
34936    #[doc = "ID: 85"]
34937    POSITION_TARGET_LOCAL_NED(POSITION_TARGET_LOCAL_NED_DATA),
34938    #[doc = "Power supply status."]
34939    #[doc = ""]
34940    #[doc = "ID: 125"]
34941    POWER_STATUS(POWER_STATUS_DATA),
34942    #[doc = "Version and capability of protocol version. This message can be requested with MAV_CMD_REQUEST_MESSAGE and is used as part of the handshaking to establish which MAVLink version should be used on the network. Every node should respond to a request for PROTOCOL_VERSION to enable the handshaking. Library implementers should consider adding this into the default decoding state machine to allow the protocol core to respond directly."]
34943    #[doc = ""]
34944    #[doc = "ID: 300"]
34945    PROTOCOL_VERSION(PROTOCOL_VERSION_DATA),
34946    #[doc = "Status generated by radio and injected into MAVLink stream."]
34947    #[doc = ""]
34948    #[doc = "ID: 109"]
34949    RADIO_STATUS(RADIO_STATUS_DATA),
34950    #[doc = "The RAW IMU readings for a 9DOF sensor, which is identified by the id (default IMU1). This message should always contain the true raw values without any scaling to allow data capture and system debugging."]
34951    #[doc = ""]
34952    #[doc = "ID: 27"]
34953    RAW_IMU(RAW_IMU_DATA),
34954    #[doc = "The RAW pressure readings for the typical setup of one absolute pressure and one differential pressure sensor. The sensor values should be the raw, UNSCALED ADC values."]
34955    #[doc = ""]
34956    #[doc = "ID: 28"]
34957    RAW_PRESSURE(RAW_PRESSURE_DATA),
34958    #[doc = "RPM sensor data message."]
34959    #[doc = ""]
34960    #[doc = "ID: 339"]
34961    RAW_RPM(RAW_RPM_DATA),
34962    #[doc = "The PPM values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%.  A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
34963    #[doc = ""]
34964    #[doc = "ID: 65"]
34965    RC_CHANNELS(RC_CHANNELS_DATA),
34966    #[doc = "The RAW values of the RC channels sent to the MAV to override info received from the RC radio. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification.  Note carefully the semantic differences between the first 8 channels and the subsequent channels."]
34967    #[doc = ""]
34968    #[doc = "ID: 70"]
34969    RC_CHANNELS_OVERRIDE(RC_CHANNELS_OVERRIDE_DATA),
34970    #[doc = "The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
34971    #[doc = ""]
34972    #[doc = "ID: 35"]
34973    RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA),
34974    #[doc = "The scaled values of the RC channels received: (-100%) -10000, (0%) 0, (100%) 10000. Channels that are inactive should be set to INT16_MAX."]
34975    #[doc = ""]
34976    #[doc = "ID: 34"]
34977    RC_CHANNELS_SCALED(RC_CHANNELS_SCALED_DATA),
34978    #[doc = "Request a data stream."]
34979    #[doc = ""]
34980    #[doc = "ID: 66"]
34981    #[deprecated = " See `MAV_CMD_SET_MESSAGE_INTERVAL ` (Deprecated since 2015-08)"]
34982    REQUEST_DATA_STREAM(REQUEST_DATA_STREAM_DATA),
34983    #[doc = "Request one or more events to be (re-)sent. If first_sequence==last_sequence, only a single event is requested. Note that first_sequence can be larger than last_sequence (because the sequence number can wrap). Each sequence will trigger an EVENT or EVENT_ERROR response."]
34984    #[doc = ""]
34985    #[doc = "ID: 412"]
34986    REQUEST_EVENT(REQUEST_EVENT_DATA),
34987    #[doc = "The autopilot is requesting a resource (file, binary, other type of data)."]
34988    #[doc = ""]
34989    #[doc = "ID: 142"]
34990    RESOURCE_REQUEST(RESOURCE_REQUEST_DATA),
34991    #[doc = "Response to a REQUEST_EVENT in case of an error (e.g. the event is not available anymore)."]
34992    #[doc = ""]
34993    #[doc = "ID: 413"]
34994    RESPONSE_EVENT_ERROR(RESPONSE_EVENT_ERROR_DATA),
34995    #[doc = "Read out the safety zone the MAV currently assumes."]
34996    #[doc = ""]
34997    #[doc = "ID: 55"]
34998    SAFETY_ALLOWED_AREA(SAFETY_ALLOWED_AREA_DATA),
34999    #[doc = "Set a safety zone (volume), which is defined by two corners of a cube. This message can be used to tell the MAV which setpoints/waypoints to accept and which to reject. Safety areas are often enforced by national or competition regulations."]
35000    #[doc = ""]
35001    #[doc = "ID: 54"]
35002    SAFETY_SET_ALLOWED_AREA(SAFETY_SET_ALLOWED_AREA_DATA),
35003    #[doc = "Status of the SatCom link."]
35004    #[doc = ""]
35005    #[doc = "ID: 8015"]
35006    SATCOM_LINK_STATUS(SATCOM_LINK_STATUS_DATA),
35007    #[doc = "The RAW IMU readings for the usual 9DOF sensor setup. This message should contain the scaled values to the described units."]
35008    #[doc = ""]
35009    #[doc = "ID: 26"]
35010    SCALED_IMU(SCALED_IMU_DATA),
35011    #[doc = "The RAW IMU readings for secondary 9DOF sensor setup. This message should contain the scaled values to the described units."]
35012    #[doc = ""]
35013    #[doc = "ID: 116"]
35014    SCALED_IMU2(SCALED_IMU2_DATA),
35015    #[doc = "The RAW IMU readings for 3rd 9DOF sensor setup. This message should contain the scaled values to the described units."]
35016    #[doc = ""]
35017    #[doc = "ID: 129"]
35018    SCALED_IMU3(SCALED_IMU3_DATA),
35019    #[doc = "The pressure readings for the typical setup of one absolute and differential pressure sensor. The units are as specified in each field."]
35020    #[doc = ""]
35021    #[doc = "ID: 29"]
35022    SCALED_PRESSURE(SCALED_PRESSURE_DATA),
35023    #[doc = "Barometer readings for 2nd barometer."]
35024    #[doc = ""]
35025    #[doc = "ID: 137"]
35026    SCALED_PRESSURE2(SCALED_PRESSURE2_DATA),
35027    #[doc = "Barometer readings for 3rd barometer."]
35028    #[doc = ""]
35029    #[doc = "ID: 143"]
35030    SCALED_PRESSURE3(SCALED_PRESSURE3_DATA),
35031    #[doc = "Monitoring of sensorpod status."]
35032    #[doc = ""]
35033    #[doc = "ID: 8012"]
35034    SENSORPOD_STATUS(SENSORPOD_STATUS_DATA),
35035    #[doc = "Calibrated airflow angle measurements."]
35036    #[doc = ""]
35037    #[doc = "ID: 8016"]
35038    SENSOR_AIRFLOW_ANGLES(SENSOR_AIRFLOW_ANGLES_DATA),
35039    #[doc = "Atmospheric sensors (temperature, humidity, ...)."]
35040    #[doc = ""]
35041    #[doc = "ID: 8009"]
35042    SENS_ATMOS(SENS_ATMOS_DATA),
35043    #[doc = "Battery pack monitoring data for Li-Ion batteries."]
35044    #[doc = ""]
35045    #[doc = "ID: 8010"]
35046    SENS_BATMON(SENS_BATMON_DATA),
35047    #[doc = "Maximum Power Point Tracker (MPPT) sensor data for solar module power performance tracking."]
35048    #[doc = ""]
35049    #[doc = "ID: 8003"]
35050    SENS_MPPT(SENS_MPPT_DATA),
35051    #[doc = "Voltage and current sensor data."]
35052    #[doc = ""]
35053    #[doc = "ID: 8002"]
35054    SENS_POWER(SENS_POWER_DATA),
35055    #[doc = "Monitoring of power board status."]
35056    #[doc = ""]
35057    #[doc = "ID: 8013"]
35058    SENS_POWER_BOARD(SENS_POWER_BOARD_DATA),
35059    #[doc = "Control a serial port. This can be used for raw access to an onboard serial peripheral such as a GPS or telemetry radio. It is designed to make it possible to update the devices firmware via MAVLink messages or change the devices settings. A message with zero bytes can be used to change just the baudrate."]
35060    #[doc = ""]
35061    #[doc = "ID: 126"]
35062    SERIAL_CONTROL(SERIAL_CONTROL_DATA),
35063    #[doc = "Superseded by ACTUATOR_OUTPUT_STATUS. The RAW values of the servo outputs (for RC input from the remote, use the RC_CHANNELS messages). The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%."]
35064    #[doc = ""]
35065    #[doc = "ID: 36"]
35066    SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA),
35067    #[doc = "Setup a MAVLink2 signing key. If called with secret_key of all zero and zero initial_timestamp will disable signing."]
35068    #[doc = ""]
35069    #[doc = "ID: 256"]
35070    SETUP_SIGNING(SETUP_SIGNING_DATA),
35071    #[doc = "Set the vehicle attitude and body angular rates."]
35072    #[doc = ""]
35073    #[doc = "ID: 139"]
35074    SET_ACTUATOR_CONTROL_TARGET(SET_ACTUATOR_CONTROL_TARGET_DATA),
35075    #[doc = "Sets a desired vehicle attitude. Used by an external controller to command the vehicle (manual controller or other system)."]
35076    #[doc = ""]
35077    #[doc = "ID: 82"]
35078    SET_ATTITUDE_TARGET(SET_ATTITUDE_TARGET_DATA),
35079    #[doc = "Sets the GPS coordinates of the vehicle local origin (0,0,0) position. Vehicle should emit GPS_GLOBAL_ORIGIN irrespective of whether the origin is changed. This enables transform between the local coordinate frame and the global (GPS) coordinate frame, which may be necessary when (for example) indoor and outdoor settings are connected and the MAV should move from in- to outdoor."]
35080    #[doc = ""]
35081    #[doc = "ID: 48"]
35082    #[deprecated = " See `MAV_CMD_SET_GLOBAL_ORIGIN` (Deprecated since 2025-04)"]
35083    SET_GPS_GLOBAL_ORIGIN(SET_GPS_GLOBAL_ORIGIN_DATA),
35084    #[doc = "Sets the home position. \tThe home position is the default position that the system will return to and land on.         The position is set automatically by the system during the takeoff (and may also be set using this message).         The global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface.         Under normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach.         The approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
35085    #[doc = ""]
35086    #[doc = "ID: 243"]
35087    #[deprecated = "The command protocol version (MAV_CMD_DO_SET_HOME) allows a GCS to detect when setting the home position has failed. See `MAV_CMD_DO_SET_HOME` (Deprecated since 2022-02)"]
35088    SET_HOME_POSITION(SET_HOME_POSITION_DATA),
35089    #[doc = "Set the system mode, as defined by enum MAV_MODE. There is no target component id as the mode is by definition for the overall aircraft, not only for one component."]
35090    #[doc = ""]
35091    #[doc = "ID: 11"]
35092    #[deprecated = "Use COMMAND_LONG with MAV_CMD_DO_SET_MODE instead. See `MAV_CMD_DO_SET_MODE` (Deprecated since 2015-12)"]
35093    SET_MODE(SET_MODE_DATA),
35094    #[doc = "Sets a desired vehicle position, velocity, and/or acceleration in a global coordinate system (WGS84). Used by an external controller to command the vehicle (manual controller or other system)."]
35095    #[doc = ""]
35096    #[doc = "ID: 86"]
35097    SET_POSITION_TARGET_GLOBAL_INT(SET_POSITION_TARGET_GLOBAL_INT_DATA),
35098    #[doc = "Sets a desired vehicle position in a local north-east-down coordinate frame. Used by an external controller to command the vehicle (manual controller or other system)."]
35099    #[doc = ""]
35100    #[doc = "ID: 84"]
35101    SET_POSITION_TARGET_LOCAL_NED(SET_POSITION_TARGET_LOCAL_NED_DATA),
35102    #[doc = "Status of simulation environment, if used."]
35103    #[doc = ""]
35104    #[doc = "ID: 108"]
35105    SIM_STATE(SIM_STATE_DATA),
35106    #[doc = "Smart Battery information (static/infrequent update). Use for updates from: smart battery to flight stack, flight stack to GCS. Use BATTERY_STATUS for the frequent battery updates."]
35107    #[doc = ""]
35108    #[doc = "ID: 370"]
35109    #[deprecated = "The BATTERY_INFO message is better aligned with UAVCAN messages, and in any case is useful even if a battery is not \"smart\". See `BATTERY_INFO` (Deprecated since 2024-02)"]
35110    SMART_BATTERY_INFO(SMART_BATTERY_INFO_DATA),
35111    #[doc = "Status text message. These messages are printed in yellow in the COMM console of QGroundControl. WARNING: They consume quite some bandwidth, so use only for important status and error messages. If implemented wisely, these messages are buffered on the MCU and sent only at a limited rate (e.g. 10 Hz)."]
35112    #[doc = ""]
35113    #[doc = "ID: 253"]
35114    STATUSTEXT(STATUSTEXT_DATA),
35115    #[doc = "Information about a storage medium. This message is sent in response to a request with MAV_CMD_REQUEST_MESSAGE and whenever the status of the storage changes (STORAGE_STATUS). Use MAV_CMD_REQUEST_MESSAGE.param2 to indicate the index/id of requested storage: 0 for all, 1 for first, 2 for second, etc."]
35116    #[doc = ""]
35117    #[doc = "ID: 261"]
35118    STORAGE_INFORMATION(STORAGE_INFORMATION_DATA),
35119    #[doc = "Tune formats supported by vehicle. This should be emitted as response to MAV_CMD_REQUEST_MESSAGE."]
35120    #[doc = ""]
35121    #[doc = "ID: 401"]
35122    SUPPORTED_TUNES(SUPPORTED_TUNES_DATA),
35123    #[doc = "The system time is the time of the master clock.         This can be emitted by flight controllers, onboard computers, or other components in the MAVLink network.         Components that are using a less reliable time source, such as a battery-backed real time clock, can choose to match their system clock to that of a SYSTEM_TYPE that indicates a more recent time.         This allows more broadly accurate date stamping of logs, and so on.         If precise time synchronization is needed then use TIMESYNC instead."]
35124    #[doc = ""]
35125    #[doc = "ID: 2"]
35126    SYSTEM_TIME(SYSTEM_TIME_DATA),
35127    #[doc = "The general system state. If the system is following the MAVLink standard, the system state is mainly defined by three orthogonal states/modes: The system mode, which is either LOCKED (motors shut down and locked), MANUAL (system under RC control), GUIDED (system with autonomous position control, position setpoint controlled manually) or AUTO (system guided by path/waypoint planner). The NAV_MODE defined the current flight state: LIFTOFF (often an open-loop maneuver), LANDING, WAYPOINTS or VECTOR. This represents the internal navigation state machine. The system status shows whether the system is currently active or not and if an emergency occurred. During the CRITICAL and EMERGENCY states the MAV is still considered to be active, but should start emergency procedures autonomously. After a failure occurred it should first move from active to critical to allow manual intervention and then move to emergency after a certain timeout."]
35128    #[doc = ""]
35129    #[doc = "ID: 1"]
35130    SYS_STATUS(SYS_STATUS_DATA),
35131    #[doc = "Request that the vehicle report terrain height at the given location (expected response is a TERRAIN_REPORT). Used by GCS to check if vehicle has all terrain data needed for a mission."]
35132    #[doc = ""]
35133    #[doc = "ID: 135"]
35134    TERRAIN_CHECK(TERRAIN_CHECK_DATA),
35135    #[doc = "Terrain data sent from GCS. The lat/lon and grid_spacing must be the same as a lat/lon from a TERRAIN_REQUEST. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
35136    #[doc = ""]
35137    #[doc = "ID: 134"]
35138    TERRAIN_DATA(TERRAIN_DATA_DATA),
35139    #[doc = "Streamed from drone to report progress of terrain map download (initiated by TERRAIN_REQUEST), or sent as a response to a TERRAIN_CHECK request. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
35140    #[doc = ""]
35141    #[doc = "ID: 136"]
35142    TERRAIN_REPORT(TERRAIN_REPORT_DATA),
35143    #[doc = "Request for terrain data and terrain status. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
35144    #[doc = ""]
35145    #[doc = "ID: 133"]
35146    TERRAIN_REQUEST(TERRAIN_REQUEST_DATA),
35147    #[doc = "Time synchronization message.         The message is used for both timesync requests and responses.         The request is sent with `ts1=syncing component timestamp` and `tc1=0`, and may be broadcast or targeted to a specific system/component.         The response is sent with `ts1=syncing component timestamp` (mirror back unchanged), and `tc1=responding component timestamp`, with the `target_system` and `target_component` set to ids of the original request.         Systems can determine if they are receiving a request or response based on the value of `tc`.         If the response has `target_system==target_component==0` the remote system has not been updated to use the component IDs and cannot reliably timesync; the requestor may report an error.         Timestamps are UNIX Epoch time or time since system boot in nanoseconds (the timestamp format can be inferred by checking for the magnitude of the number; generally it doesn't matter as only the offset is used).         The message sequence is repeated numerous times with results being filtered/averaged to estimate the offset.         See also: <https://mavlink.io/en/services/timesync.html>."]
35148    #[doc = ""]
35149    #[doc = "ID: 111"]
35150    TIMESYNC(TIMESYNC_DATA),
35151    #[doc = "Time/duration estimates for various events and actions given the current vehicle state and position."]
35152    #[doc = ""]
35153    #[doc = "ID: 380"]
35154    TIME_ESTIMATE_TO_TARGET(TIME_ESTIMATE_TO_TARGET_DATA),
35155    #[doc = "Describe a trajectory using an array of up-to 5 bezier control points in the local frame (MAV_FRAME_LOCAL_NED)."]
35156    #[doc = ""]
35157    #[doc = "ID: 333"]
35158    TRAJECTORY_REPRESENTATION_BEZIER(TRAJECTORY_REPRESENTATION_BEZIER_DATA),
35159    #[doc = "Describe a trajectory using an array of up-to 5 waypoints in the local frame (MAV_FRAME_LOCAL_NED)."]
35160    #[doc = ""]
35161    #[doc = "ID: 332"]
35162    TRAJECTORY_REPRESENTATION_WAYPOINTS(TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA),
35163    #[doc = "Message for transporting \"arbitrary\" variable-length data from one component to another (broadcast is not forbidden, but discouraged). The encoding of the data is usually extension specific, i.e. determined by the source, and is usually not documented as part of the MAVLink specification."]
35164    #[doc = ""]
35165    #[doc = "ID: 385"]
35166    TUNNEL(TUNNEL_DATA),
35167    #[doc = "General information describing a particular UAVCAN node. Please refer to the definition of the UAVCAN service \"uavcan.protocol.GetNodeInfo\" for the background information. This message should be emitted by the system whenever a new node appears online, or an existing node reboots. Additionally, it can be emitted upon request from the other end of the MAVLink channel (see MAV_CMD_UAVCAN_GET_NODE_INFO). It is also not prohibited to emit this message unconditionally at a low frequency. The UAVCAN specification is available at <http://uavcan.org>."]
35168    #[doc = ""]
35169    #[doc = "ID: 311"]
35170    UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA),
35171    #[doc = "General status information of an UAVCAN node. Please refer to the definition of the UAVCAN message \"uavcan.protocol.NodeStatus\" for the background information. The UAVCAN specification is available at <http://uavcan.org>."]
35172    #[doc = ""]
35173    #[doc = "ID: 310"]
35174    UAVCAN_NODE_STATUS(UAVCAN_NODE_STATUS_DATA),
35175    #[doc = "The global position resulting from GPS and sensor fusion."]
35176    #[doc = ""]
35177    #[doc = "ID: 340"]
35178    UTM_GLOBAL_POSITION(UTM_GLOBAL_POSITION_DATA),
35179    #[doc = "Message implementing parts of the V2 payload specs in V1 frames for transitional support."]
35180    #[doc = ""]
35181    #[doc = "ID: 248"]
35182    V2_EXTENSION(V2_EXTENSION_DATA),
35183    #[doc = "Metrics typically displayed on a HUD for fixed wing aircraft."]
35184    #[doc = ""]
35185    #[doc = "ID: 74"]
35186    VFR_HUD(VFR_HUD_DATA),
35187    #[doc = "Vibration levels and accelerometer clipping."]
35188    #[doc = ""]
35189    #[doc = "ID: 241"]
35190    VIBRATION(VIBRATION_DATA),
35191    #[doc = "Global position estimate from a Vicon motion system source."]
35192    #[doc = ""]
35193    #[doc = "ID: 104"]
35194    VICON_POSITION_ESTIMATE(VICON_POSITION_ESTIMATE_DATA),
35195    #[doc = "Information about video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE, where param2 indicates the video stream id: 0 for all streams, 1 for first, 2 for second, etc."]
35196    #[doc = ""]
35197    #[doc = "ID: 269"]
35198    VIDEO_STREAM_INFORMATION(VIDEO_STREAM_INFORMATION_DATA),
35199    #[doc = "Information about the status of a video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE."]
35200    #[doc = ""]
35201    #[doc = "ID: 270"]
35202    VIDEO_STREAM_STATUS(VIDEO_STREAM_STATUS_DATA),
35203    #[doc = "Local position/attitude estimate from a vision source."]
35204    #[doc = ""]
35205    #[doc = "ID: 102"]
35206    VISION_POSITION_ESTIMATE(VISION_POSITION_ESTIMATE_DATA),
35207    #[doc = "Speed estimate from a vision source."]
35208    #[doc = ""]
35209    #[doc = "ID: 103"]
35210    VISION_SPEED_ESTIMATE(VISION_SPEED_ESTIMATE_DATA),
35211    #[doc = "Cumulative distance traveled for each reported wheel."]
35212    #[doc = ""]
35213    #[doc = "ID: 9000"]
35214    WHEEL_DISTANCE(WHEEL_DISTANCE_DATA),
35215    #[doc = "Configure WiFi AP SSID, password, and mode. This message is re-emitted as an acknowledgement by the AP. The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
35216    #[doc = ""]
35217    #[doc = "ID: 299"]
35218    WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA),
35219    #[doc = "Winch status."]
35220    #[doc = ""]
35221    #[doc = "ID: 9005"]
35222    WINCH_STATUS(WINCH_STATUS_DATA),
35223    #[doc = "Wind estimate from vehicle. Note that despite the name, this message does not actually contain any covariances but instead variability and accuracy fields in terms of standard deviation (1-STD)."]
35224    #[doc = ""]
35225    #[doc = "ID: 231"]
35226    WIND_COV(WIND_COV_DATA),
35227}
35228impl MavMessage {
35229    pub const fn all_ids() -> &'static [u32] {
35230        &[
35231            0u32, 1u32, 2u32, 4u32, 5u32, 6u32, 7u32, 8u32, 11u32, 20u32, 21u32, 22u32, 23u32,
35232            24u32, 25u32, 26u32, 27u32, 28u32, 29u32, 30u32, 31u32, 32u32, 33u32, 34u32, 35u32,
35233            36u32, 37u32, 38u32, 39u32, 40u32, 41u32, 42u32, 43u32, 44u32, 45u32, 46u32, 47u32,
35234            48u32, 49u32, 50u32, 51u32, 54u32, 55u32, 61u32, 62u32, 63u32, 64u32, 65u32, 66u32,
35235            67u32, 69u32, 70u32, 73u32, 74u32, 75u32, 76u32, 77u32, 80u32, 81u32, 82u32, 83u32,
35236            84u32, 85u32, 86u32, 87u32, 89u32, 90u32, 91u32, 92u32, 93u32, 100u32, 101u32, 102u32,
35237            103u32, 104u32, 105u32, 106u32, 107u32, 108u32, 109u32, 110u32, 111u32, 112u32, 113u32,
35238            114u32, 115u32, 116u32, 117u32, 118u32, 119u32, 120u32, 121u32, 122u32, 123u32, 124u32,
35239            125u32, 126u32, 127u32, 128u32, 129u32, 130u32, 131u32, 132u32, 133u32, 134u32, 135u32,
35240            136u32, 137u32, 138u32, 139u32, 140u32, 141u32, 142u32, 143u32, 144u32, 146u32, 147u32,
35241            148u32, 149u32, 162u32, 192u32, 223u32, 224u32, 225u32, 230u32, 231u32, 232u32, 233u32,
35242            234u32, 235u32, 241u32, 242u32, 243u32, 244u32, 245u32, 246u32, 247u32, 248u32, 249u32,
35243            250u32, 251u32, 252u32, 253u32, 254u32, 256u32, 257u32, 258u32, 259u32, 260u32, 261u32,
35244            262u32, 263u32, 264u32, 265u32, 266u32, 267u32, 268u32, 269u32, 270u32, 271u32, 275u32,
35245            276u32, 277u32, 280u32, 281u32, 282u32, 283u32, 284u32, 285u32, 286u32, 287u32, 288u32,
35246            290u32, 291u32, 299u32, 300u32, 301u32, 310u32, 311u32, 320u32, 321u32, 322u32, 323u32,
35247            324u32, 330u32, 331u32, 332u32, 333u32, 334u32, 335u32, 336u32, 339u32, 340u32, 350u32,
35248            360u32, 370u32, 371u32, 372u32, 373u32, 375u32, 380u32, 385u32, 386u32, 387u32, 388u32,
35249            390u32, 395u32, 396u32, 397u32, 400u32, 401u32, 410u32, 411u32, 412u32, 413u32, 435u32,
35250            436u32, 437u32, 440u32, 8002u32, 8003u32, 8004u32, 8005u32, 8006u32, 8007u32, 8008u32,
35251            8009u32, 8010u32, 8011u32, 8012u32, 8013u32, 8014u32, 8015u32, 8016u32, 9000u32,
35252            9005u32, 12900u32, 12901u32, 12902u32, 12903u32, 12904u32, 12905u32, 12915u32,
35253            12918u32, 12919u32, 12920u32,
35254        ]
35255    }
35256}
35257impl Message for MavMessage {
35258    fn parse(
35259        version: MavlinkVersion,
35260        id: u32,
35261        payload: &[u8],
35262    ) -> Result<Self, ::mavlink_core::error::ParserError> {
35263        match id {
35264            ACTUATOR_CONTROL_TARGET_DATA::ID => {
35265                ACTUATOR_CONTROL_TARGET_DATA::deser(version, payload)
35266                    .map(Self::ACTUATOR_CONTROL_TARGET)
35267            }
35268            ACTUATOR_OUTPUT_STATUS_DATA::ID => ACTUATOR_OUTPUT_STATUS_DATA::deser(version, payload)
35269                .map(Self::ACTUATOR_OUTPUT_STATUS),
35270            ADSB_VEHICLE_DATA::ID => {
35271                ADSB_VEHICLE_DATA::deser(version, payload).map(Self::ADSB_VEHICLE)
35272            }
35273            AIS_VESSEL_DATA::ID => AIS_VESSEL_DATA::deser(version, payload).map(Self::AIS_VESSEL),
35274            ALTITUDE_DATA::ID => ALTITUDE_DATA::deser(version, payload).map(Self::ALTITUDE),
35275            ASLCTRL_DATA_DATA::ID => {
35276                ASLCTRL_DATA_DATA::deser(version, payload).map(Self::ASLCTRL_DATA)
35277            }
35278            ASLCTRL_DEBUG_DATA::ID => {
35279                ASLCTRL_DEBUG_DATA::deser(version, payload).map(Self::ASLCTRL_DEBUG)
35280            }
35281            ASLUAV_STATUS_DATA::ID => {
35282                ASLUAV_STATUS_DATA::deser(version, payload).map(Self::ASLUAV_STATUS)
35283            }
35284            ASL_OBCTRL_DATA::ID => ASL_OBCTRL_DATA::deser(version, payload).map(Self::ASL_OBCTRL),
35285            ATTITUDE_DATA::ID => ATTITUDE_DATA::deser(version, payload).map(Self::ATTITUDE),
35286            ATTITUDE_QUATERNION_DATA::ID => {
35287                ATTITUDE_QUATERNION_DATA::deser(version, payload).map(Self::ATTITUDE_QUATERNION)
35288            }
35289            ATTITUDE_QUATERNION_COV_DATA::ID => {
35290                ATTITUDE_QUATERNION_COV_DATA::deser(version, payload)
35291                    .map(Self::ATTITUDE_QUATERNION_COV)
35292            }
35293            ATTITUDE_TARGET_DATA::ID => {
35294                ATTITUDE_TARGET_DATA::deser(version, payload).map(Self::ATTITUDE_TARGET)
35295            }
35296            ATT_POS_MOCAP_DATA::ID => {
35297                ATT_POS_MOCAP_DATA::deser(version, payload).map(Self::ATT_POS_MOCAP)
35298            }
35299            AUTH_KEY_DATA::ID => AUTH_KEY_DATA::deser(version, payload).map(Self::AUTH_KEY),
35300            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
35301                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::deser(version, payload)
35302                    .map(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE)
35303            }
35304            AUTOPILOT_VERSION_DATA::ID => {
35305                AUTOPILOT_VERSION_DATA::deser(version, payload).map(Self::AUTOPILOT_VERSION)
35306            }
35307            AVAILABLE_MODES_DATA::ID => {
35308                AVAILABLE_MODES_DATA::deser(version, payload).map(Self::AVAILABLE_MODES)
35309            }
35310            AVAILABLE_MODES_MONITOR_DATA::ID => {
35311                AVAILABLE_MODES_MONITOR_DATA::deser(version, payload)
35312                    .map(Self::AVAILABLE_MODES_MONITOR)
35313            }
35314            BATTERY_INFO_DATA::ID => {
35315                BATTERY_INFO_DATA::deser(version, payload).map(Self::BATTERY_INFO)
35316            }
35317            BATTERY_STATUS_DATA::ID => {
35318                BATTERY_STATUS_DATA::deser(version, payload).map(Self::BATTERY_STATUS)
35319            }
35320            BUTTON_CHANGE_DATA::ID => {
35321                BUTTON_CHANGE_DATA::deser(version, payload).map(Self::BUTTON_CHANGE)
35322            }
35323            CAMERA_CAPTURE_STATUS_DATA::ID => {
35324                CAMERA_CAPTURE_STATUS_DATA::deser(version, payload).map(Self::CAMERA_CAPTURE_STATUS)
35325            }
35326            CAMERA_FOV_STATUS_DATA::ID => {
35327                CAMERA_FOV_STATUS_DATA::deser(version, payload).map(Self::CAMERA_FOV_STATUS)
35328            }
35329            CAMERA_IMAGE_CAPTURED_DATA::ID => {
35330                CAMERA_IMAGE_CAPTURED_DATA::deser(version, payload).map(Self::CAMERA_IMAGE_CAPTURED)
35331            }
35332            CAMERA_INFORMATION_DATA::ID => {
35333                CAMERA_INFORMATION_DATA::deser(version, payload).map(Self::CAMERA_INFORMATION)
35334            }
35335            CAMERA_SETTINGS_DATA::ID => {
35336                CAMERA_SETTINGS_DATA::deser(version, payload).map(Self::CAMERA_SETTINGS)
35337            }
35338            CAMERA_THERMAL_RANGE_DATA::ID => {
35339                CAMERA_THERMAL_RANGE_DATA::deser(version, payload).map(Self::CAMERA_THERMAL_RANGE)
35340            }
35341            CAMERA_TRACKING_GEO_STATUS_DATA::ID => {
35342                CAMERA_TRACKING_GEO_STATUS_DATA::deser(version, payload)
35343                    .map(Self::CAMERA_TRACKING_GEO_STATUS)
35344            }
35345            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => {
35346                CAMERA_TRACKING_IMAGE_STATUS_DATA::deser(version, payload)
35347                    .map(Self::CAMERA_TRACKING_IMAGE_STATUS)
35348            }
35349            CAMERA_TRIGGER_DATA::ID => {
35350                CAMERA_TRIGGER_DATA::deser(version, payload).map(Self::CAMERA_TRIGGER)
35351            }
35352            CANFD_FRAME_DATA::ID => {
35353                CANFD_FRAME_DATA::deser(version, payload).map(Self::CANFD_FRAME)
35354            }
35355            CAN_FILTER_MODIFY_DATA::ID => {
35356                CAN_FILTER_MODIFY_DATA::deser(version, payload).map(Self::CAN_FILTER_MODIFY)
35357            }
35358            CAN_FRAME_DATA::ID => CAN_FRAME_DATA::deser(version, payload).map(Self::CAN_FRAME),
35359            CELLULAR_CONFIG_DATA::ID => {
35360                CELLULAR_CONFIG_DATA::deser(version, payload).map(Self::CELLULAR_CONFIG)
35361            }
35362            CELLULAR_STATUS_DATA::ID => {
35363                CELLULAR_STATUS_DATA::deser(version, payload).map(Self::CELLULAR_STATUS)
35364            }
35365            CHANGE_OPERATOR_CONTROL_DATA::ID => {
35366                CHANGE_OPERATOR_CONTROL_DATA::deser(version, payload)
35367                    .map(Self::CHANGE_OPERATOR_CONTROL)
35368            }
35369            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => {
35370                CHANGE_OPERATOR_CONTROL_ACK_DATA::deser(version, payload)
35371                    .map(Self::CHANGE_OPERATOR_CONTROL_ACK)
35372            }
35373            COLLISION_DATA::ID => COLLISION_DATA::deser(version, payload).map(Self::COLLISION),
35374            COMMAND_ACK_DATA::ID => {
35375                COMMAND_ACK_DATA::deser(version, payload).map(Self::COMMAND_ACK)
35376            }
35377            COMMAND_CANCEL_DATA::ID => {
35378                COMMAND_CANCEL_DATA::deser(version, payload).map(Self::COMMAND_CANCEL)
35379            }
35380            COMMAND_INT_DATA::ID => {
35381                COMMAND_INT_DATA::deser(version, payload).map(Self::COMMAND_INT)
35382            }
35383            COMMAND_INT_STAMPED_DATA::ID => {
35384                COMMAND_INT_STAMPED_DATA::deser(version, payload).map(Self::COMMAND_INT_STAMPED)
35385            }
35386            COMMAND_LONG_DATA::ID => {
35387                COMMAND_LONG_DATA::deser(version, payload).map(Self::COMMAND_LONG)
35388            }
35389            COMMAND_LONG_STAMPED_DATA::ID => {
35390                COMMAND_LONG_STAMPED_DATA::deser(version, payload).map(Self::COMMAND_LONG_STAMPED)
35391            }
35392            COMPONENT_INFORMATION_DATA::ID => {
35393                COMPONENT_INFORMATION_DATA::deser(version, payload).map(Self::COMPONENT_INFORMATION)
35394            }
35395            COMPONENT_INFORMATION_BASIC_DATA::ID => {
35396                COMPONENT_INFORMATION_BASIC_DATA::deser(version, payload)
35397                    .map(Self::COMPONENT_INFORMATION_BASIC)
35398            }
35399            COMPONENT_METADATA_DATA::ID => {
35400                COMPONENT_METADATA_DATA::deser(version, payload).map(Self::COMPONENT_METADATA)
35401            }
35402            CONTROL_SYSTEM_STATE_DATA::ID => {
35403                CONTROL_SYSTEM_STATE_DATA::deser(version, payload).map(Self::CONTROL_SYSTEM_STATE)
35404            }
35405            CURRENT_EVENT_SEQUENCE_DATA::ID => CURRENT_EVENT_SEQUENCE_DATA::deser(version, payload)
35406                .map(Self::CURRENT_EVENT_SEQUENCE),
35407            CURRENT_MODE_DATA::ID => {
35408                CURRENT_MODE_DATA::deser(version, payload).map(Self::CURRENT_MODE)
35409            }
35410            DATA_STREAM_DATA::ID => {
35411                DATA_STREAM_DATA::deser(version, payload).map(Self::DATA_STREAM)
35412            }
35413            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => {
35414                DATA_TRANSMISSION_HANDSHAKE_DATA::deser(version, payload)
35415                    .map(Self::DATA_TRANSMISSION_HANDSHAKE)
35416            }
35417            DEBUG_DATA::ID => DEBUG_DATA::deser(version, payload).map(Self::DEBUG),
35418            DEBUG_FLOAT_ARRAY_DATA::ID => {
35419                DEBUG_FLOAT_ARRAY_DATA::deser(version, payload).map(Self::DEBUG_FLOAT_ARRAY)
35420            }
35421            DEBUG_VECT_DATA::ID => DEBUG_VECT_DATA::deser(version, payload).map(Self::DEBUG_VECT),
35422            DISTANCE_SENSOR_DATA::ID => {
35423                DISTANCE_SENSOR_DATA::deser(version, payload).map(Self::DISTANCE_SENSOR)
35424            }
35425            EFI_STATUS_DATA::ID => EFI_STATUS_DATA::deser(version, payload).map(Self::EFI_STATUS),
35426            EKF_EXT_DATA::ID => EKF_EXT_DATA::deser(version, payload).map(Self::EKF_EXT),
35427            ENCAPSULATED_DATA_DATA::ID => {
35428                ENCAPSULATED_DATA_DATA::deser(version, payload).map(Self::ENCAPSULATED_DATA)
35429            }
35430            ESC_INFO_DATA::ID => ESC_INFO_DATA::deser(version, payload).map(Self::ESC_INFO),
35431            ESC_STATUS_DATA::ID => ESC_STATUS_DATA::deser(version, payload).map(Self::ESC_STATUS),
35432            ESTIMATOR_STATUS_DATA::ID => {
35433                ESTIMATOR_STATUS_DATA::deser(version, payload).map(Self::ESTIMATOR_STATUS)
35434            }
35435            EVENT_DATA::ID => EVENT_DATA::deser(version, payload).map(Self::EVENT),
35436            EXTENDED_SYS_STATE_DATA::ID => {
35437                EXTENDED_SYS_STATE_DATA::deser(version, payload).map(Self::EXTENDED_SYS_STATE)
35438            }
35439            FENCE_STATUS_DATA::ID => {
35440                FENCE_STATUS_DATA::deser(version, payload).map(Self::FENCE_STATUS)
35441            }
35442            FILE_TRANSFER_PROTOCOL_DATA::ID => FILE_TRANSFER_PROTOCOL_DATA::deser(version, payload)
35443                .map(Self::FILE_TRANSFER_PROTOCOL),
35444            FLIGHT_INFORMATION_DATA::ID => {
35445                FLIGHT_INFORMATION_DATA::deser(version, payload).map(Self::FLIGHT_INFORMATION)
35446            }
35447            FOLLOW_TARGET_DATA::ID => {
35448                FOLLOW_TARGET_DATA::deser(version, payload).map(Self::FOLLOW_TARGET)
35449            }
35450            FUEL_STATUS_DATA::ID => {
35451                FUEL_STATUS_DATA::deser(version, payload).map(Self::FUEL_STATUS)
35452            }
35453            FW_SOARING_DATA_DATA::ID => {
35454                FW_SOARING_DATA_DATA::deser(version, payload).map(Self::FW_SOARING_DATA)
35455            }
35456            GENERATOR_STATUS_DATA::ID => {
35457                GENERATOR_STATUS_DATA::deser(version, payload).map(Self::GENERATOR_STATUS)
35458            }
35459            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => {
35460                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::deser(version, payload)
35461                    .map(Self::GIMBAL_DEVICE_ATTITUDE_STATUS)
35462            }
35463            GIMBAL_DEVICE_INFORMATION_DATA::ID => {
35464                GIMBAL_DEVICE_INFORMATION_DATA::deser(version, payload)
35465                    .map(Self::GIMBAL_DEVICE_INFORMATION)
35466            }
35467            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => {
35468                GIMBAL_DEVICE_SET_ATTITUDE_DATA::deser(version, payload)
35469                    .map(Self::GIMBAL_DEVICE_SET_ATTITUDE)
35470            }
35471            GIMBAL_MANAGER_INFORMATION_DATA::ID => {
35472                GIMBAL_MANAGER_INFORMATION_DATA::deser(version, payload)
35473                    .map(Self::GIMBAL_MANAGER_INFORMATION)
35474            }
35475            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => {
35476                GIMBAL_MANAGER_SET_ATTITUDE_DATA::deser(version, payload)
35477                    .map(Self::GIMBAL_MANAGER_SET_ATTITUDE)
35478            }
35479            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
35480                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::deser(version, payload)
35481                    .map(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL)
35482            }
35483            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => {
35484                GIMBAL_MANAGER_SET_PITCHYAW_DATA::deser(version, payload)
35485                    .map(Self::GIMBAL_MANAGER_SET_PITCHYAW)
35486            }
35487            GIMBAL_MANAGER_STATUS_DATA::ID => {
35488                GIMBAL_MANAGER_STATUS_DATA::deser(version, payload).map(Self::GIMBAL_MANAGER_STATUS)
35489            }
35490            GLOBAL_POSITION_INT_DATA::ID => {
35491                GLOBAL_POSITION_INT_DATA::deser(version, payload).map(Self::GLOBAL_POSITION_INT)
35492            }
35493            GLOBAL_POSITION_INT_COV_DATA::ID => {
35494                GLOBAL_POSITION_INT_COV_DATA::deser(version, payload)
35495                    .map(Self::GLOBAL_POSITION_INT_COV)
35496            }
35497            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
35498                GLOBAL_VISION_POSITION_ESTIMATE_DATA::deser(version, payload)
35499                    .map(Self::GLOBAL_VISION_POSITION_ESTIMATE)
35500            }
35501            GPS2_RAW_DATA::ID => GPS2_RAW_DATA::deser(version, payload).map(Self::GPS2_RAW),
35502            GPS2_RTK_DATA::ID => GPS2_RTK_DATA::deser(version, payload).map(Self::GPS2_RTK),
35503            GPS_GLOBAL_ORIGIN_DATA::ID => {
35504                GPS_GLOBAL_ORIGIN_DATA::deser(version, payload).map(Self::GPS_GLOBAL_ORIGIN)
35505            }
35506            GPS_INJECT_DATA_DATA::ID => {
35507                GPS_INJECT_DATA_DATA::deser(version, payload).map(Self::GPS_INJECT_DATA)
35508            }
35509            GPS_INPUT_DATA::ID => GPS_INPUT_DATA::deser(version, payload).map(Self::GPS_INPUT),
35510            GPS_RAW_INT_DATA::ID => {
35511                GPS_RAW_INT_DATA::deser(version, payload).map(Self::GPS_RAW_INT)
35512            }
35513            GPS_RTCM_DATA_DATA::ID => {
35514                GPS_RTCM_DATA_DATA::deser(version, payload).map(Self::GPS_RTCM_DATA)
35515            }
35516            GPS_RTK_DATA::ID => GPS_RTK_DATA::deser(version, payload).map(Self::GPS_RTK),
35517            GPS_STATUS_DATA::ID => GPS_STATUS_DATA::deser(version, payload).map(Self::GPS_STATUS),
35518            GSM_LINK_STATUS_DATA::ID => {
35519                GSM_LINK_STATUS_DATA::deser(version, payload).map(Self::GSM_LINK_STATUS)
35520            }
35521            HEARTBEAT_DATA::ID => HEARTBEAT_DATA::deser(version, payload).map(Self::HEARTBEAT),
35522            HIGHRES_IMU_DATA::ID => {
35523                HIGHRES_IMU_DATA::deser(version, payload).map(Self::HIGHRES_IMU)
35524            }
35525            HIGH_LATENCY_DATA::ID => {
35526                HIGH_LATENCY_DATA::deser(version, payload).map(Self::HIGH_LATENCY)
35527            }
35528            HIGH_LATENCY2_DATA::ID => {
35529                HIGH_LATENCY2_DATA::deser(version, payload).map(Self::HIGH_LATENCY2)
35530            }
35531            HIL_ACTUATOR_CONTROLS_DATA::ID => {
35532                HIL_ACTUATOR_CONTROLS_DATA::deser(version, payload).map(Self::HIL_ACTUATOR_CONTROLS)
35533            }
35534            HIL_CONTROLS_DATA::ID => {
35535                HIL_CONTROLS_DATA::deser(version, payload).map(Self::HIL_CONTROLS)
35536            }
35537            HIL_GPS_DATA::ID => HIL_GPS_DATA::deser(version, payload).map(Self::HIL_GPS),
35538            HIL_OPTICAL_FLOW_DATA::ID => {
35539                HIL_OPTICAL_FLOW_DATA::deser(version, payload).map(Self::HIL_OPTICAL_FLOW)
35540            }
35541            HIL_RC_INPUTS_RAW_DATA::ID => {
35542                HIL_RC_INPUTS_RAW_DATA::deser(version, payload).map(Self::HIL_RC_INPUTS_RAW)
35543            }
35544            HIL_SENSOR_DATA::ID => HIL_SENSOR_DATA::deser(version, payload).map(Self::HIL_SENSOR),
35545            HIL_STATE_DATA::ID => HIL_STATE_DATA::deser(version, payload).map(Self::HIL_STATE),
35546            HIL_STATE_QUATERNION_DATA::ID => {
35547                HIL_STATE_QUATERNION_DATA::deser(version, payload).map(Self::HIL_STATE_QUATERNION)
35548            }
35549            HOME_POSITION_DATA::ID => {
35550                HOME_POSITION_DATA::deser(version, payload).map(Self::HOME_POSITION)
35551            }
35552            HYGROMETER_SENSOR_DATA::ID => {
35553                HYGROMETER_SENSOR_DATA::deser(version, payload).map(Self::HYGROMETER_SENSOR)
35554            }
35555            ILLUMINATOR_STATUS_DATA::ID => {
35556                ILLUMINATOR_STATUS_DATA::deser(version, payload).map(Self::ILLUMINATOR_STATUS)
35557            }
35558            ISBD_LINK_STATUS_DATA::ID => {
35559                ISBD_LINK_STATUS_DATA::deser(version, payload).map(Self::ISBD_LINK_STATUS)
35560            }
35561            LANDING_TARGET_DATA::ID => {
35562                LANDING_TARGET_DATA::deser(version, payload).map(Self::LANDING_TARGET)
35563            }
35564            LINK_NODE_STATUS_DATA::ID => {
35565                LINK_NODE_STATUS_DATA::deser(version, payload).map(Self::LINK_NODE_STATUS)
35566            }
35567            LOCAL_POSITION_NED_DATA::ID => {
35568                LOCAL_POSITION_NED_DATA::deser(version, payload).map(Self::LOCAL_POSITION_NED)
35569            }
35570            LOCAL_POSITION_NED_COV_DATA::ID => LOCAL_POSITION_NED_COV_DATA::deser(version, payload)
35571                .map(Self::LOCAL_POSITION_NED_COV),
35572            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
35573                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::deser(version, payload)
35574                    .map(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET)
35575            }
35576            LOGGING_ACK_DATA::ID => {
35577                LOGGING_ACK_DATA::deser(version, payload).map(Self::LOGGING_ACK)
35578            }
35579            LOGGING_DATA_DATA::ID => {
35580                LOGGING_DATA_DATA::deser(version, payload).map(Self::LOGGING_DATA)
35581            }
35582            LOGGING_DATA_ACKED_DATA::ID => {
35583                LOGGING_DATA_ACKED_DATA::deser(version, payload).map(Self::LOGGING_DATA_ACKED)
35584            }
35585            LOG_DATA_DATA::ID => LOG_DATA_DATA::deser(version, payload).map(Self::LOG_DATA),
35586            LOG_ENTRY_DATA::ID => LOG_ENTRY_DATA::deser(version, payload).map(Self::LOG_ENTRY),
35587            LOG_ERASE_DATA::ID => LOG_ERASE_DATA::deser(version, payload).map(Self::LOG_ERASE),
35588            LOG_REQUEST_DATA_DATA::ID => {
35589                LOG_REQUEST_DATA_DATA::deser(version, payload).map(Self::LOG_REQUEST_DATA)
35590            }
35591            LOG_REQUEST_END_DATA::ID => {
35592                LOG_REQUEST_END_DATA::deser(version, payload).map(Self::LOG_REQUEST_END)
35593            }
35594            LOG_REQUEST_LIST_DATA::ID => {
35595                LOG_REQUEST_LIST_DATA::deser(version, payload).map(Self::LOG_REQUEST_LIST)
35596            }
35597            MAG_CAL_REPORT_DATA::ID => {
35598                MAG_CAL_REPORT_DATA::deser(version, payload).map(Self::MAG_CAL_REPORT)
35599            }
35600            MANUAL_CONTROL_DATA::ID => {
35601                MANUAL_CONTROL_DATA::deser(version, payload).map(Self::MANUAL_CONTROL)
35602            }
35603            MANUAL_SETPOINT_DATA::ID => {
35604                MANUAL_SETPOINT_DATA::deser(version, payload).map(Self::MANUAL_SETPOINT)
35605            }
35606            MEMORY_VECT_DATA::ID => {
35607                MEMORY_VECT_DATA::deser(version, payload).map(Self::MEMORY_VECT)
35608            }
35609            MESSAGE_INTERVAL_DATA::ID => {
35610                MESSAGE_INTERVAL_DATA::deser(version, payload).map(Self::MESSAGE_INTERVAL)
35611            }
35612            MISSION_ACK_DATA::ID => {
35613                MISSION_ACK_DATA::deser(version, payload).map(Self::MISSION_ACK)
35614            }
35615            MISSION_CLEAR_ALL_DATA::ID => {
35616                MISSION_CLEAR_ALL_DATA::deser(version, payload).map(Self::MISSION_CLEAR_ALL)
35617            }
35618            MISSION_COUNT_DATA::ID => {
35619                MISSION_COUNT_DATA::deser(version, payload).map(Self::MISSION_COUNT)
35620            }
35621            MISSION_CURRENT_DATA::ID => {
35622                MISSION_CURRENT_DATA::deser(version, payload).map(Self::MISSION_CURRENT)
35623            }
35624            MISSION_ITEM_DATA::ID => {
35625                MISSION_ITEM_DATA::deser(version, payload).map(Self::MISSION_ITEM)
35626            }
35627            MISSION_ITEM_INT_DATA::ID => {
35628                MISSION_ITEM_INT_DATA::deser(version, payload).map(Self::MISSION_ITEM_INT)
35629            }
35630            MISSION_ITEM_REACHED_DATA::ID => {
35631                MISSION_ITEM_REACHED_DATA::deser(version, payload).map(Self::MISSION_ITEM_REACHED)
35632            }
35633            MISSION_REQUEST_DATA::ID => {
35634                MISSION_REQUEST_DATA::deser(version, payload).map(Self::MISSION_REQUEST)
35635            }
35636            MISSION_REQUEST_INT_DATA::ID => {
35637                MISSION_REQUEST_INT_DATA::deser(version, payload).map(Self::MISSION_REQUEST_INT)
35638            }
35639            MISSION_REQUEST_LIST_DATA::ID => {
35640                MISSION_REQUEST_LIST_DATA::deser(version, payload).map(Self::MISSION_REQUEST_LIST)
35641            }
35642            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => {
35643                MISSION_REQUEST_PARTIAL_LIST_DATA::deser(version, payload)
35644                    .map(Self::MISSION_REQUEST_PARTIAL_LIST)
35645            }
35646            MISSION_SET_CURRENT_DATA::ID => {
35647                MISSION_SET_CURRENT_DATA::deser(version, payload).map(Self::MISSION_SET_CURRENT)
35648            }
35649            MISSION_WRITE_PARTIAL_LIST_DATA::ID => {
35650                MISSION_WRITE_PARTIAL_LIST_DATA::deser(version, payload)
35651                    .map(Self::MISSION_WRITE_PARTIAL_LIST)
35652            }
35653            MOUNT_ORIENTATION_DATA::ID => {
35654                MOUNT_ORIENTATION_DATA::deser(version, payload).map(Self::MOUNT_ORIENTATION)
35655            }
35656            NAMED_VALUE_FLOAT_DATA::ID => {
35657                NAMED_VALUE_FLOAT_DATA::deser(version, payload).map(Self::NAMED_VALUE_FLOAT)
35658            }
35659            NAMED_VALUE_INT_DATA::ID => {
35660                NAMED_VALUE_INT_DATA::deser(version, payload).map(Self::NAMED_VALUE_INT)
35661            }
35662            NAV_CONTROLLER_OUTPUT_DATA::ID => {
35663                NAV_CONTROLLER_OUTPUT_DATA::deser(version, payload).map(Self::NAV_CONTROLLER_OUTPUT)
35664            }
35665            OBSTACLE_DISTANCE_DATA::ID => {
35666                OBSTACLE_DISTANCE_DATA::deser(version, payload).map(Self::OBSTACLE_DISTANCE)
35667            }
35668            ODOMETRY_DATA::ID => ODOMETRY_DATA::deser(version, payload).map(Self::ODOMETRY),
35669            ONBOARD_COMPUTER_STATUS_DATA::ID => {
35670                ONBOARD_COMPUTER_STATUS_DATA::deser(version, payload)
35671                    .map(Self::ONBOARD_COMPUTER_STATUS)
35672            }
35673            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => {
35674                OPEN_DRONE_ID_ARM_STATUS_DATA::deser(version, payload)
35675                    .map(Self::OPEN_DRONE_ID_ARM_STATUS)
35676            }
35677            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => {
35678                OPEN_DRONE_ID_AUTHENTICATION_DATA::deser(version, payload)
35679                    .map(Self::OPEN_DRONE_ID_AUTHENTICATION)
35680            }
35681            OPEN_DRONE_ID_BASIC_ID_DATA::ID => OPEN_DRONE_ID_BASIC_ID_DATA::deser(version, payload)
35682                .map(Self::OPEN_DRONE_ID_BASIC_ID),
35683            OPEN_DRONE_ID_LOCATION_DATA::ID => OPEN_DRONE_ID_LOCATION_DATA::deser(version, payload)
35684                .map(Self::OPEN_DRONE_ID_LOCATION),
35685            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => {
35686                OPEN_DRONE_ID_MESSAGE_PACK_DATA::deser(version, payload)
35687                    .map(Self::OPEN_DRONE_ID_MESSAGE_PACK)
35688            }
35689            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => {
35690                OPEN_DRONE_ID_OPERATOR_ID_DATA::deser(version, payload)
35691                    .map(Self::OPEN_DRONE_ID_OPERATOR_ID)
35692            }
35693            OPEN_DRONE_ID_SELF_ID_DATA::ID => {
35694                OPEN_DRONE_ID_SELF_ID_DATA::deser(version, payload).map(Self::OPEN_DRONE_ID_SELF_ID)
35695            }
35696            OPEN_DRONE_ID_SYSTEM_DATA::ID => {
35697                OPEN_DRONE_ID_SYSTEM_DATA::deser(version, payload).map(Self::OPEN_DRONE_ID_SYSTEM)
35698            }
35699            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => {
35700                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::deser(version, payload)
35701                    .map(Self::OPEN_DRONE_ID_SYSTEM_UPDATE)
35702            }
35703            OPTICAL_FLOW_DATA::ID => {
35704                OPTICAL_FLOW_DATA::deser(version, payload).map(Self::OPTICAL_FLOW)
35705            }
35706            OPTICAL_FLOW_RAD_DATA::ID => {
35707                OPTICAL_FLOW_RAD_DATA::deser(version, payload).map(Self::OPTICAL_FLOW_RAD)
35708            }
35709            ORBIT_EXECUTION_STATUS_DATA::ID => ORBIT_EXECUTION_STATUS_DATA::deser(version, payload)
35710                .map(Self::ORBIT_EXECUTION_STATUS),
35711            PARAM_EXT_ACK_DATA::ID => {
35712                PARAM_EXT_ACK_DATA::deser(version, payload).map(Self::PARAM_EXT_ACK)
35713            }
35714            PARAM_EXT_REQUEST_LIST_DATA::ID => PARAM_EXT_REQUEST_LIST_DATA::deser(version, payload)
35715                .map(Self::PARAM_EXT_REQUEST_LIST),
35716            PARAM_EXT_REQUEST_READ_DATA::ID => PARAM_EXT_REQUEST_READ_DATA::deser(version, payload)
35717                .map(Self::PARAM_EXT_REQUEST_READ),
35718            PARAM_EXT_SET_DATA::ID => {
35719                PARAM_EXT_SET_DATA::deser(version, payload).map(Self::PARAM_EXT_SET)
35720            }
35721            PARAM_EXT_VALUE_DATA::ID => {
35722                PARAM_EXT_VALUE_DATA::deser(version, payload).map(Self::PARAM_EXT_VALUE)
35723            }
35724            PARAM_MAP_RC_DATA::ID => {
35725                PARAM_MAP_RC_DATA::deser(version, payload).map(Self::PARAM_MAP_RC)
35726            }
35727            PARAM_REQUEST_LIST_DATA::ID => {
35728                PARAM_REQUEST_LIST_DATA::deser(version, payload).map(Self::PARAM_REQUEST_LIST)
35729            }
35730            PARAM_REQUEST_READ_DATA::ID => {
35731                PARAM_REQUEST_READ_DATA::deser(version, payload).map(Self::PARAM_REQUEST_READ)
35732            }
35733            PARAM_SET_DATA::ID => PARAM_SET_DATA::deser(version, payload).map(Self::PARAM_SET),
35734            PARAM_VALUE_DATA::ID => {
35735                PARAM_VALUE_DATA::deser(version, payload).map(Self::PARAM_VALUE)
35736            }
35737            PING_DATA::ID => PING_DATA::deser(version, payload).map(Self::PING),
35738            PLAY_TUNE_DATA::ID => PLAY_TUNE_DATA::deser(version, payload).map(Self::PLAY_TUNE),
35739            PLAY_TUNE_V2_DATA::ID => {
35740                PLAY_TUNE_V2_DATA::deser(version, payload).map(Self::PLAY_TUNE_V2)
35741            }
35742            POSITION_TARGET_GLOBAL_INT_DATA::ID => {
35743                POSITION_TARGET_GLOBAL_INT_DATA::deser(version, payload)
35744                    .map(Self::POSITION_TARGET_GLOBAL_INT)
35745            }
35746            POSITION_TARGET_LOCAL_NED_DATA::ID => {
35747                POSITION_TARGET_LOCAL_NED_DATA::deser(version, payload)
35748                    .map(Self::POSITION_TARGET_LOCAL_NED)
35749            }
35750            POWER_STATUS_DATA::ID => {
35751                POWER_STATUS_DATA::deser(version, payload).map(Self::POWER_STATUS)
35752            }
35753            PROTOCOL_VERSION_DATA::ID => {
35754                PROTOCOL_VERSION_DATA::deser(version, payload).map(Self::PROTOCOL_VERSION)
35755            }
35756            RADIO_STATUS_DATA::ID => {
35757                RADIO_STATUS_DATA::deser(version, payload).map(Self::RADIO_STATUS)
35758            }
35759            RAW_IMU_DATA::ID => RAW_IMU_DATA::deser(version, payload).map(Self::RAW_IMU),
35760            RAW_PRESSURE_DATA::ID => {
35761                RAW_PRESSURE_DATA::deser(version, payload).map(Self::RAW_PRESSURE)
35762            }
35763            RAW_RPM_DATA::ID => RAW_RPM_DATA::deser(version, payload).map(Self::RAW_RPM),
35764            RC_CHANNELS_DATA::ID => {
35765                RC_CHANNELS_DATA::deser(version, payload).map(Self::RC_CHANNELS)
35766            }
35767            RC_CHANNELS_OVERRIDE_DATA::ID => {
35768                RC_CHANNELS_OVERRIDE_DATA::deser(version, payload).map(Self::RC_CHANNELS_OVERRIDE)
35769            }
35770            RC_CHANNELS_RAW_DATA::ID => {
35771                RC_CHANNELS_RAW_DATA::deser(version, payload).map(Self::RC_CHANNELS_RAW)
35772            }
35773            RC_CHANNELS_SCALED_DATA::ID => {
35774                RC_CHANNELS_SCALED_DATA::deser(version, payload).map(Self::RC_CHANNELS_SCALED)
35775            }
35776            REQUEST_DATA_STREAM_DATA::ID => {
35777                REQUEST_DATA_STREAM_DATA::deser(version, payload).map(Self::REQUEST_DATA_STREAM)
35778            }
35779            REQUEST_EVENT_DATA::ID => {
35780                REQUEST_EVENT_DATA::deser(version, payload).map(Self::REQUEST_EVENT)
35781            }
35782            RESOURCE_REQUEST_DATA::ID => {
35783                RESOURCE_REQUEST_DATA::deser(version, payload).map(Self::RESOURCE_REQUEST)
35784            }
35785            RESPONSE_EVENT_ERROR_DATA::ID => {
35786                RESPONSE_EVENT_ERROR_DATA::deser(version, payload).map(Self::RESPONSE_EVENT_ERROR)
35787            }
35788            SAFETY_ALLOWED_AREA_DATA::ID => {
35789                SAFETY_ALLOWED_AREA_DATA::deser(version, payload).map(Self::SAFETY_ALLOWED_AREA)
35790            }
35791            SAFETY_SET_ALLOWED_AREA_DATA::ID => {
35792                SAFETY_SET_ALLOWED_AREA_DATA::deser(version, payload)
35793                    .map(Self::SAFETY_SET_ALLOWED_AREA)
35794            }
35795            SATCOM_LINK_STATUS_DATA::ID => {
35796                SATCOM_LINK_STATUS_DATA::deser(version, payload).map(Self::SATCOM_LINK_STATUS)
35797            }
35798            SCALED_IMU_DATA::ID => SCALED_IMU_DATA::deser(version, payload).map(Self::SCALED_IMU),
35799            SCALED_IMU2_DATA::ID => {
35800                SCALED_IMU2_DATA::deser(version, payload).map(Self::SCALED_IMU2)
35801            }
35802            SCALED_IMU3_DATA::ID => {
35803                SCALED_IMU3_DATA::deser(version, payload).map(Self::SCALED_IMU3)
35804            }
35805            SCALED_PRESSURE_DATA::ID => {
35806                SCALED_PRESSURE_DATA::deser(version, payload).map(Self::SCALED_PRESSURE)
35807            }
35808            SCALED_PRESSURE2_DATA::ID => {
35809                SCALED_PRESSURE2_DATA::deser(version, payload).map(Self::SCALED_PRESSURE2)
35810            }
35811            SCALED_PRESSURE3_DATA::ID => {
35812                SCALED_PRESSURE3_DATA::deser(version, payload).map(Self::SCALED_PRESSURE3)
35813            }
35814            SENSORPOD_STATUS_DATA::ID => {
35815                SENSORPOD_STATUS_DATA::deser(version, payload).map(Self::SENSORPOD_STATUS)
35816            }
35817            SENSOR_AIRFLOW_ANGLES_DATA::ID => {
35818                SENSOR_AIRFLOW_ANGLES_DATA::deser(version, payload).map(Self::SENSOR_AIRFLOW_ANGLES)
35819            }
35820            SENS_ATMOS_DATA::ID => SENS_ATMOS_DATA::deser(version, payload).map(Self::SENS_ATMOS),
35821            SENS_BATMON_DATA::ID => {
35822                SENS_BATMON_DATA::deser(version, payload).map(Self::SENS_BATMON)
35823            }
35824            SENS_MPPT_DATA::ID => SENS_MPPT_DATA::deser(version, payload).map(Self::SENS_MPPT),
35825            SENS_POWER_DATA::ID => SENS_POWER_DATA::deser(version, payload).map(Self::SENS_POWER),
35826            SENS_POWER_BOARD_DATA::ID => {
35827                SENS_POWER_BOARD_DATA::deser(version, payload).map(Self::SENS_POWER_BOARD)
35828            }
35829            SERIAL_CONTROL_DATA::ID => {
35830                SERIAL_CONTROL_DATA::deser(version, payload).map(Self::SERIAL_CONTROL)
35831            }
35832            SERVO_OUTPUT_RAW_DATA::ID => {
35833                SERVO_OUTPUT_RAW_DATA::deser(version, payload).map(Self::SERVO_OUTPUT_RAW)
35834            }
35835            SETUP_SIGNING_DATA::ID => {
35836                SETUP_SIGNING_DATA::deser(version, payload).map(Self::SETUP_SIGNING)
35837            }
35838            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => {
35839                SET_ACTUATOR_CONTROL_TARGET_DATA::deser(version, payload)
35840                    .map(Self::SET_ACTUATOR_CONTROL_TARGET)
35841            }
35842            SET_ATTITUDE_TARGET_DATA::ID => {
35843                SET_ATTITUDE_TARGET_DATA::deser(version, payload).map(Self::SET_ATTITUDE_TARGET)
35844            }
35845            SET_GPS_GLOBAL_ORIGIN_DATA::ID => {
35846                SET_GPS_GLOBAL_ORIGIN_DATA::deser(version, payload).map(Self::SET_GPS_GLOBAL_ORIGIN)
35847            }
35848            SET_HOME_POSITION_DATA::ID => {
35849                SET_HOME_POSITION_DATA::deser(version, payload).map(Self::SET_HOME_POSITION)
35850            }
35851            SET_MODE_DATA::ID => SET_MODE_DATA::deser(version, payload).map(Self::SET_MODE),
35852            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => {
35853                SET_POSITION_TARGET_GLOBAL_INT_DATA::deser(version, payload)
35854                    .map(Self::SET_POSITION_TARGET_GLOBAL_INT)
35855            }
35856            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => {
35857                SET_POSITION_TARGET_LOCAL_NED_DATA::deser(version, payload)
35858                    .map(Self::SET_POSITION_TARGET_LOCAL_NED)
35859            }
35860            SIM_STATE_DATA::ID => SIM_STATE_DATA::deser(version, payload).map(Self::SIM_STATE),
35861            SMART_BATTERY_INFO_DATA::ID => {
35862                SMART_BATTERY_INFO_DATA::deser(version, payload).map(Self::SMART_BATTERY_INFO)
35863            }
35864            STATUSTEXT_DATA::ID => STATUSTEXT_DATA::deser(version, payload).map(Self::STATUSTEXT),
35865            STORAGE_INFORMATION_DATA::ID => {
35866                STORAGE_INFORMATION_DATA::deser(version, payload).map(Self::STORAGE_INFORMATION)
35867            }
35868            SUPPORTED_TUNES_DATA::ID => {
35869                SUPPORTED_TUNES_DATA::deser(version, payload).map(Self::SUPPORTED_TUNES)
35870            }
35871            SYSTEM_TIME_DATA::ID => {
35872                SYSTEM_TIME_DATA::deser(version, payload).map(Self::SYSTEM_TIME)
35873            }
35874            SYS_STATUS_DATA::ID => SYS_STATUS_DATA::deser(version, payload).map(Self::SYS_STATUS),
35875            TERRAIN_CHECK_DATA::ID => {
35876                TERRAIN_CHECK_DATA::deser(version, payload).map(Self::TERRAIN_CHECK)
35877            }
35878            TERRAIN_DATA_DATA::ID => {
35879                TERRAIN_DATA_DATA::deser(version, payload).map(Self::TERRAIN_DATA)
35880            }
35881            TERRAIN_REPORT_DATA::ID => {
35882                TERRAIN_REPORT_DATA::deser(version, payload).map(Self::TERRAIN_REPORT)
35883            }
35884            TERRAIN_REQUEST_DATA::ID => {
35885                TERRAIN_REQUEST_DATA::deser(version, payload).map(Self::TERRAIN_REQUEST)
35886            }
35887            TIMESYNC_DATA::ID => TIMESYNC_DATA::deser(version, payload).map(Self::TIMESYNC),
35888            TIME_ESTIMATE_TO_TARGET_DATA::ID => {
35889                TIME_ESTIMATE_TO_TARGET_DATA::deser(version, payload)
35890                    .map(Self::TIME_ESTIMATE_TO_TARGET)
35891            }
35892            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
35893                TRAJECTORY_REPRESENTATION_BEZIER_DATA::deser(version, payload)
35894                    .map(Self::TRAJECTORY_REPRESENTATION_BEZIER)
35895            }
35896            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
35897                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::deser(version, payload)
35898                    .map(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS)
35899            }
35900            TUNNEL_DATA::ID => TUNNEL_DATA::deser(version, payload).map(Self::TUNNEL),
35901            UAVCAN_NODE_INFO_DATA::ID => {
35902                UAVCAN_NODE_INFO_DATA::deser(version, payload).map(Self::UAVCAN_NODE_INFO)
35903            }
35904            UAVCAN_NODE_STATUS_DATA::ID => {
35905                UAVCAN_NODE_STATUS_DATA::deser(version, payload).map(Self::UAVCAN_NODE_STATUS)
35906            }
35907            UTM_GLOBAL_POSITION_DATA::ID => {
35908                UTM_GLOBAL_POSITION_DATA::deser(version, payload).map(Self::UTM_GLOBAL_POSITION)
35909            }
35910            V2_EXTENSION_DATA::ID => {
35911                V2_EXTENSION_DATA::deser(version, payload).map(Self::V2_EXTENSION)
35912            }
35913            VFR_HUD_DATA::ID => VFR_HUD_DATA::deser(version, payload).map(Self::VFR_HUD),
35914            VIBRATION_DATA::ID => VIBRATION_DATA::deser(version, payload).map(Self::VIBRATION),
35915            VICON_POSITION_ESTIMATE_DATA::ID => {
35916                VICON_POSITION_ESTIMATE_DATA::deser(version, payload)
35917                    .map(Self::VICON_POSITION_ESTIMATE)
35918            }
35919            VIDEO_STREAM_INFORMATION_DATA::ID => {
35920                VIDEO_STREAM_INFORMATION_DATA::deser(version, payload)
35921                    .map(Self::VIDEO_STREAM_INFORMATION)
35922            }
35923            VIDEO_STREAM_STATUS_DATA::ID => {
35924                VIDEO_STREAM_STATUS_DATA::deser(version, payload).map(Self::VIDEO_STREAM_STATUS)
35925            }
35926            VISION_POSITION_ESTIMATE_DATA::ID => {
35927                VISION_POSITION_ESTIMATE_DATA::deser(version, payload)
35928                    .map(Self::VISION_POSITION_ESTIMATE)
35929            }
35930            VISION_SPEED_ESTIMATE_DATA::ID => {
35931                VISION_SPEED_ESTIMATE_DATA::deser(version, payload).map(Self::VISION_SPEED_ESTIMATE)
35932            }
35933            WHEEL_DISTANCE_DATA::ID => {
35934                WHEEL_DISTANCE_DATA::deser(version, payload).map(Self::WHEEL_DISTANCE)
35935            }
35936            WIFI_CONFIG_AP_DATA::ID => {
35937                WIFI_CONFIG_AP_DATA::deser(version, payload).map(Self::WIFI_CONFIG_AP)
35938            }
35939            WINCH_STATUS_DATA::ID => {
35940                WINCH_STATUS_DATA::deser(version, payload).map(Self::WINCH_STATUS)
35941            }
35942            WIND_COV_DATA::ID => WIND_COV_DATA::deser(version, payload).map(Self::WIND_COV),
35943            _ => Err(::mavlink_core::error::ParserError::UnknownMessage { id }),
35944        }
35945    }
35946    fn message_name(&self) -> &'static str {
35947        match self {
35948            Self::ACTUATOR_CONTROL_TARGET(..) => ACTUATOR_CONTROL_TARGET_DATA::NAME,
35949            Self::ACTUATOR_OUTPUT_STATUS(..) => ACTUATOR_OUTPUT_STATUS_DATA::NAME,
35950            Self::ADSB_VEHICLE(..) => ADSB_VEHICLE_DATA::NAME,
35951            Self::AIS_VESSEL(..) => AIS_VESSEL_DATA::NAME,
35952            Self::ALTITUDE(..) => ALTITUDE_DATA::NAME,
35953            Self::ASLCTRL_DATA(..) => ASLCTRL_DATA_DATA::NAME,
35954            Self::ASLCTRL_DEBUG(..) => ASLCTRL_DEBUG_DATA::NAME,
35955            Self::ASLUAV_STATUS(..) => ASLUAV_STATUS_DATA::NAME,
35956            Self::ASL_OBCTRL(..) => ASL_OBCTRL_DATA::NAME,
35957            Self::ATTITUDE(..) => ATTITUDE_DATA::NAME,
35958            Self::ATTITUDE_QUATERNION(..) => ATTITUDE_QUATERNION_DATA::NAME,
35959            Self::ATTITUDE_QUATERNION_COV(..) => ATTITUDE_QUATERNION_COV_DATA::NAME,
35960            Self::ATTITUDE_TARGET(..) => ATTITUDE_TARGET_DATA::NAME,
35961            Self::ATT_POS_MOCAP(..) => ATT_POS_MOCAP_DATA::NAME,
35962            Self::AUTH_KEY(..) => AUTH_KEY_DATA::NAME,
35963            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(..) => {
35964                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME
35965            }
35966            Self::AUTOPILOT_VERSION(..) => AUTOPILOT_VERSION_DATA::NAME,
35967            Self::AVAILABLE_MODES(..) => AVAILABLE_MODES_DATA::NAME,
35968            Self::AVAILABLE_MODES_MONITOR(..) => AVAILABLE_MODES_MONITOR_DATA::NAME,
35969            Self::BATTERY_INFO(..) => BATTERY_INFO_DATA::NAME,
35970            Self::BATTERY_STATUS(..) => BATTERY_STATUS_DATA::NAME,
35971            Self::BUTTON_CHANGE(..) => BUTTON_CHANGE_DATA::NAME,
35972            Self::CAMERA_CAPTURE_STATUS(..) => CAMERA_CAPTURE_STATUS_DATA::NAME,
35973            Self::CAMERA_FOV_STATUS(..) => CAMERA_FOV_STATUS_DATA::NAME,
35974            Self::CAMERA_IMAGE_CAPTURED(..) => CAMERA_IMAGE_CAPTURED_DATA::NAME,
35975            Self::CAMERA_INFORMATION(..) => CAMERA_INFORMATION_DATA::NAME,
35976            Self::CAMERA_SETTINGS(..) => CAMERA_SETTINGS_DATA::NAME,
35977            Self::CAMERA_THERMAL_RANGE(..) => CAMERA_THERMAL_RANGE_DATA::NAME,
35978            Self::CAMERA_TRACKING_GEO_STATUS(..) => CAMERA_TRACKING_GEO_STATUS_DATA::NAME,
35979            Self::CAMERA_TRACKING_IMAGE_STATUS(..) => CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME,
35980            Self::CAMERA_TRIGGER(..) => CAMERA_TRIGGER_DATA::NAME,
35981            Self::CANFD_FRAME(..) => CANFD_FRAME_DATA::NAME,
35982            Self::CAN_FILTER_MODIFY(..) => CAN_FILTER_MODIFY_DATA::NAME,
35983            Self::CAN_FRAME(..) => CAN_FRAME_DATA::NAME,
35984            Self::CELLULAR_CONFIG(..) => CELLULAR_CONFIG_DATA::NAME,
35985            Self::CELLULAR_STATUS(..) => CELLULAR_STATUS_DATA::NAME,
35986            Self::CHANGE_OPERATOR_CONTROL(..) => CHANGE_OPERATOR_CONTROL_DATA::NAME,
35987            Self::CHANGE_OPERATOR_CONTROL_ACK(..) => CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME,
35988            Self::COLLISION(..) => COLLISION_DATA::NAME,
35989            Self::COMMAND_ACK(..) => COMMAND_ACK_DATA::NAME,
35990            Self::COMMAND_CANCEL(..) => COMMAND_CANCEL_DATA::NAME,
35991            Self::COMMAND_INT(..) => COMMAND_INT_DATA::NAME,
35992            Self::COMMAND_INT_STAMPED(..) => COMMAND_INT_STAMPED_DATA::NAME,
35993            Self::COMMAND_LONG(..) => COMMAND_LONG_DATA::NAME,
35994            Self::COMMAND_LONG_STAMPED(..) => COMMAND_LONG_STAMPED_DATA::NAME,
35995            Self::COMPONENT_INFORMATION(..) => COMPONENT_INFORMATION_DATA::NAME,
35996            Self::COMPONENT_INFORMATION_BASIC(..) => COMPONENT_INFORMATION_BASIC_DATA::NAME,
35997            Self::COMPONENT_METADATA(..) => COMPONENT_METADATA_DATA::NAME,
35998            Self::CONTROL_SYSTEM_STATE(..) => CONTROL_SYSTEM_STATE_DATA::NAME,
35999            Self::CURRENT_EVENT_SEQUENCE(..) => CURRENT_EVENT_SEQUENCE_DATA::NAME,
36000            Self::CURRENT_MODE(..) => CURRENT_MODE_DATA::NAME,
36001            Self::DATA_STREAM(..) => DATA_STREAM_DATA::NAME,
36002            Self::DATA_TRANSMISSION_HANDSHAKE(..) => DATA_TRANSMISSION_HANDSHAKE_DATA::NAME,
36003            Self::DEBUG(..) => DEBUG_DATA::NAME,
36004            Self::DEBUG_FLOAT_ARRAY(..) => DEBUG_FLOAT_ARRAY_DATA::NAME,
36005            Self::DEBUG_VECT(..) => DEBUG_VECT_DATA::NAME,
36006            Self::DISTANCE_SENSOR(..) => DISTANCE_SENSOR_DATA::NAME,
36007            Self::EFI_STATUS(..) => EFI_STATUS_DATA::NAME,
36008            Self::EKF_EXT(..) => EKF_EXT_DATA::NAME,
36009            Self::ENCAPSULATED_DATA(..) => ENCAPSULATED_DATA_DATA::NAME,
36010            Self::ESC_INFO(..) => ESC_INFO_DATA::NAME,
36011            Self::ESC_STATUS(..) => ESC_STATUS_DATA::NAME,
36012            Self::ESTIMATOR_STATUS(..) => ESTIMATOR_STATUS_DATA::NAME,
36013            Self::EVENT(..) => EVENT_DATA::NAME,
36014            Self::EXTENDED_SYS_STATE(..) => EXTENDED_SYS_STATE_DATA::NAME,
36015            Self::FENCE_STATUS(..) => FENCE_STATUS_DATA::NAME,
36016            Self::FILE_TRANSFER_PROTOCOL(..) => FILE_TRANSFER_PROTOCOL_DATA::NAME,
36017            Self::FLIGHT_INFORMATION(..) => FLIGHT_INFORMATION_DATA::NAME,
36018            Self::FOLLOW_TARGET(..) => FOLLOW_TARGET_DATA::NAME,
36019            Self::FUEL_STATUS(..) => FUEL_STATUS_DATA::NAME,
36020            Self::FW_SOARING_DATA(..) => FW_SOARING_DATA_DATA::NAME,
36021            Self::GENERATOR_STATUS(..) => GENERATOR_STATUS_DATA::NAME,
36022            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(..) => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME,
36023            Self::GIMBAL_DEVICE_INFORMATION(..) => GIMBAL_DEVICE_INFORMATION_DATA::NAME,
36024            Self::GIMBAL_DEVICE_SET_ATTITUDE(..) => GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME,
36025            Self::GIMBAL_MANAGER_INFORMATION(..) => GIMBAL_MANAGER_INFORMATION_DATA::NAME,
36026            Self::GIMBAL_MANAGER_SET_ATTITUDE(..) => GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME,
36027            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(..) => {
36028                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME
36029            }
36030            Self::GIMBAL_MANAGER_SET_PITCHYAW(..) => GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME,
36031            Self::GIMBAL_MANAGER_STATUS(..) => GIMBAL_MANAGER_STATUS_DATA::NAME,
36032            Self::GLOBAL_POSITION_INT(..) => GLOBAL_POSITION_INT_DATA::NAME,
36033            Self::GLOBAL_POSITION_INT_COV(..) => GLOBAL_POSITION_INT_COV_DATA::NAME,
36034            Self::GLOBAL_VISION_POSITION_ESTIMATE(..) => GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME,
36035            Self::GPS2_RAW(..) => GPS2_RAW_DATA::NAME,
36036            Self::GPS2_RTK(..) => GPS2_RTK_DATA::NAME,
36037            Self::GPS_GLOBAL_ORIGIN(..) => GPS_GLOBAL_ORIGIN_DATA::NAME,
36038            Self::GPS_INJECT_DATA(..) => GPS_INJECT_DATA_DATA::NAME,
36039            Self::GPS_INPUT(..) => GPS_INPUT_DATA::NAME,
36040            Self::GPS_RAW_INT(..) => GPS_RAW_INT_DATA::NAME,
36041            Self::GPS_RTCM_DATA(..) => GPS_RTCM_DATA_DATA::NAME,
36042            Self::GPS_RTK(..) => GPS_RTK_DATA::NAME,
36043            Self::GPS_STATUS(..) => GPS_STATUS_DATA::NAME,
36044            Self::GSM_LINK_STATUS(..) => GSM_LINK_STATUS_DATA::NAME,
36045            Self::HEARTBEAT(..) => HEARTBEAT_DATA::NAME,
36046            Self::HIGHRES_IMU(..) => HIGHRES_IMU_DATA::NAME,
36047            Self::HIGH_LATENCY(..) => HIGH_LATENCY_DATA::NAME,
36048            Self::HIGH_LATENCY2(..) => HIGH_LATENCY2_DATA::NAME,
36049            Self::HIL_ACTUATOR_CONTROLS(..) => HIL_ACTUATOR_CONTROLS_DATA::NAME,
36050            Self::HIL_CONTROLS(..) => HIL_CONTROLS_DATA::NAME,
36051            Self::HIL_GPS(..) => HIL_GPS_DATA::NAME,
36052            Self::HIL_OPTICAL_FLOW(..) => HIL_OPTICAL_FLOW_DATA::NAME,
36053            Self::HIL_RC_INPUTS_RAW(..) => HIL_RC_INPUTS_RAW_DATA::NAME,
36054            Self::HIL_SENSOR(..) => HIL_SENSOR_DATA::NAME,
36055            Self::HIL_STATE(..) => HIL_STATE_DATA::NAME,
36056            Self::HIL_STATE_QUATERNION(..) => HIL_STATE_QUATERNION_DATA::NAME,
36057            Self::HOME_POSITION(..) => HOME_POSITION_DATA::NAME,
36058            Self::HYGROMETER_SENSOR(..) => HYGROMETER_SENSOR_DATA::NAME,
36059            Self::ILLUMINATOR_STATUS(..) => ILLUMINATOR_STATUS_DATA::NAME,
36060            Self::ISBD_LINK_STATUS(..) => ISBD_LINK_STATUS_DATA::NAME,
36061            Self::LANDING_TARGET(..) => LANDING_TARGET_DATA::NAME,
36062            Self::LINK_NODE_STATUS(..) => LINK_NODE_STATUS_DATA::NAME,
36063            Self::LOCAL_POSITION_NED(..) => LOCAL_POSITION_NED_DATA::NAME,
36064            Self::LOCAL_POSITION_NED_COV(..) => LOCAL_POSITION_NED_COV_DATA::NAME,
36065            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(..) => {
36066                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME
36067            }
36068            Self::LOGGING_ACK(..) => LOGGING_ACK_DATA::NAME,
36069            Self::LOGGING_DATA(..) => LOGGING_DATA_DATA::NAME,
36070            Self::LOGGING_DATA_ACKED(..) => LOGGING_DATA_ACKED_DATA::NAME,
36071            Self::LOG_DATA(..) => LOG_DATA_DATA::NAME,
36072            Self::LOG_ENTRY(..) => LOG_ENTRY_DATA::NAME,
36073            Self::LOG_ERASE(..) => LOG_ERASE_DATA::NAME,
36074            Self::LOG_REQUEST_DATA(..) => LOG_REQUEST_DATA_DATA::NAME,
36075            Self::LOG_REQUEST_END(..) => LOG_REQUEST_END_DATA::NAME,
36076            Self::LOG_REQUEST_LIST(..) => LOG_REQUEST_LIST_DATA::NAME,
36077            Self::MAG_CAL_REPORT(..) => MAG_CAL_REPORT_DATA::NAME,
36078            Self::MANUAL_CONTROL(..) => MANUAL_CONTROL_DATA::NAME,
36079            Self::MANUAL_SETPOINT(..) => MANUAL_SETPOINT_DATA::NAME,
36080            Self::MEMORY_VECT(..) => MEMORY_VECT_DATA::NAME,
36081            Self::MESSAGE_INTERVAL(..) => MESSAGE_INTERVAL_DATA::NAME,
36082            Self::MISSION_ACK(..) => MISSION_ACK_DATA::NAME,
36083            Self::MISSION_CLEAR_ALL(..) => MISSION_CLEAR_ALL_DATA::NAME,
36084            Self::MISSION_COUNT(..) => MISSION_COUNT_DATA::NAME,
36085            Self::MISSION_CURRENT(..) => MISSION_CURRENT_DATA::NAME,
36086            Self::MISSION_ITEM(..) => MISSION_ITEM_DATA::NAME,
36087            Self::MISSION_ITEM_INT(..) => MISSION_ITEM_INT_DATA::NAME,
36088            Self::MISSION_ITEM_REACHED(..) => MISSION_ITEM_REACHED_DATA::NAME,
36089            Self::MISSION_REQUEST(..) => MISSION_REQUEST_DATA::NAME,
36090            Self::MISSION_REQUEST_INT(..) => MISSION_REQUEST_INT_DATA::NAME,
36091            Self::MISSION_REQUEST_LIST(..) => MISSION_REQUEST_LIST_DATA::NAME,
36092            Self::MISSION_REQUEST_PARTIAL_LIST(..) => MISSION_REQUEST_PARTIAL_LIST_DATA::NAME,
36093            Self::MISSION_SET_CURRENT(..) => MISSION_SET_CURRENT_DATA::NAME,
36094            Self::MISSION_WRITE_PARTIAL_LIST(..) => MISSION_WRITE_PARTIAL_LIST_DATA::NAME,
36095            Self::MOUNT_ORIENTATION(..) => MOUNT_ORIENTATION_DATA::NAME,
36096            Self::NAMED_VALUE_FLOAT(..) => NAMED_VALUE_FLOAT_DATA::NAME,
36097            Self::NAMED_VALUE_INT(..) => NAMED_VALUE_INT_DATA::NAME,
36098            Self::NAV_CONTROLLER_OUTPUT(..) => NAV_CONTROLLER_OUTPUT_DATA::NAME,
36099            Self::OBSTACLE_DISTANCE(..) => OBSTACLE_DISTANCE_DATA::NAME,
36100            Self::ODOMETRY(..) => ODOMETRY_DATA::NAME,
36101            Self::ONBOARD_COMPUTER_STATUS(..) => ONBOARD_COMPUTER_STATUS_DATA::NAME,
36102            Self::OPEN_DRONE_ID_ARM_STATUS(..) => OPEN_DRONE_ID_ARM_STATUS_DATA::NAME,
36103            Self::OPEN_DRONE_ID_AUTHENTICATION(..) => OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME,
36104            Self::OPEN_DRONE_ID_BASIC_ID(..) => OPEN_DRONE_ID_BASIC_ID_DATA::NAME,
36105            Self::OPEN_DRONE_ID_LOCATION(..) => OPEN_DRONE_ID_LOCATION_DATA::NAME,
36106            Self::OPEN_DRONE_ID_MESSAGE_PACK(..) => OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME,
36107            Self::OPEN_DRONE_ID_OPERATOR_ID(..) => OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME,
36108            Self::OPEN_DRONE_ID_SELF_ID(..) => OPEN_DRONE_ID_SELF_ID_DATA::NAME,
36109            Self::OPEN_DRONE_ID_SYSTEM(..) => OPEN_DRONE_ID_SYSTEM_DATA::NAME,
36110            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(..) => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME,
36111            Self::OPTICAL_FLOW(..) => OPTICAL_FLOW_DATA::NAME,
36112            Self::OPTICAL_FLOW_RAD(..) => OPTICAL_FLOW_RAD_DATA::NAME,
36113            Self::ORBIT_EXECUTION_STATUS(..) => ORBIT_EXECUTION_STATUS_DATA::NAME,
36114            Self::PARAM_EXT_ACK(..) => PARAM_EXT_ACK_DATA::NAME,
36115            Self::PARAM_EXT_REQUEST_LIST(..) => PARAM_EXT_REQUEST_LIST_DATA::NAME,
36116            Self::PARAM_EXT_REQUEST_READ(..) => PARAM_EXT_REQUEST_READ_DATA::NAME,
36117            Self::PARAM_EXT_SET(..) => PARAM_EXT_SET_DATA::NAME,
36118            Self::PARAM_EXT_VALUE(..) => PARAM_EXT_VALUE_DATA::NAME,
36119            Self::PARAM_MAP_RC(..) => PARAM_MAP_RC_DATA::NAME,
36120            Self::PARAM_REQUEST_LIST(..) => PARAM_REQUEST_LIST_DATA::NAME,
36121            Self::PARAM_REQUEST_READ(..) => PARAM_REQUEST_READ_DATA::NAME,
36122            Self::PARAM_SET(..) => PARAM_SET_DATA::NAME,
36123            Self::PARAM_VALUE(..) => PARAM_VALUE_DATA::NAME,
36124            Self::PING(..) => PING_DATA::NAME,
36125            Self::PLAY_TUNE(..) => PLAY_TUNE_DATA::NAME,
36126            Self::PLAY_TUNE_V2(..) => PLAY_TUNE_V2_DATA::NAME,
36127            Self::POSITION_TARGET_GLOBAL_INT(..) => POSITION_TARGET_GLOBAL_INT_DATA::NAME,
36128            Self::POSITION_TARGET_LOCAL_NED(..) => POSITION_TARGET_LOCAL_NED_DATA::NAME,
36129            Self::POWER_STATUS(..) => POWER_STATUS_DATA::NAME,
36130            Self::PROTOCOL_VERSION(..) => PROTOCOL_VERSION_DATA::NAME,
36131            Self::RADIO_STATUS(..) => RADIO_STATUS_DATA::NAME,
36132            Self::RAW_IMU(..) => RAW_IMU_DATA::NAME,
36133            Self::RAW_PRESSURE(..) => RAW_PRESSURE_DATA::NAME,
36134            Self::RAW_RPM(..) => RAW_RPM_DATA::NAME,
36135            Self::RC_CHANNELS(..) => RC_CHANNELS_DATA::NAME,
36136            Self::RC_CHANNELS_OVERRIDE(..) => RC_CHANNELS_OVERRIDE_DATA::NAME,
36137            Self::RC_CHANNELS_RAW(..) => RC_CHANNELS_RAW_DATA::NAME,
36138            Self::RC_CHANNELS_SCALED(..) => RC_CHANNELS_SCALED_DATA::NAME,
36139            Self::REQUEST_DATA_STREAM(..) => REQUEST_DATA_STREAM_DATA::NAME,
36140            Self::REQUEST_EVENT(..) => REQUEST_EVENT_DATA::NAME,
36141            Self::RESOURCE_REQUEST(..) => RESOURCE_REQUEST_DATA::NAME,
36142            Self::RESPONSE_EVENT_ERROR(..) => RESPONSE_EVENT_ERROR_DATA::NAME,
36143            Self::SAFETY_ALLOWED_AREA(..) => SAFETY_ALLOWED_AREA_DATA::NAME,
36144            Self::SAFETY_SET_ALLOWED_AREA(..) => SAFETY_SET_ALLOWED_AREA_DATA::NAME,
36145            Self::SATCOM_LINK_STATUS(..) => SATCOM_LINK_STATUS_DATA::NAME,
36146            Self::SCALED_IMU(..) => SCALED_IMU_DATA::NAME,
36147            Self::SCALED_IMU2(..) => SCALED_IMU2_DATA::NAME,
36148            Self::SCALED_IMU3(..) => SCALED_IMU3_DATA::NAME,
36149            Self::SCALED_PRESSURE(..) => SCALED_PRESSURE_DATA::NAME,
36150            Self::SCALED_PRESSURE2(..) => SCALED_PRESSURE2_DATA::NAME,
36151            Self::SCALED_PRESSURE3(..) => SCALED_PRESSURE3_DATA::NAME,
36152            Self::SENSORPOD_STATUS(..) => SENSORPOD_STATUS_DATA::NAME,
36153            Self::SENSOR_AIRFLOW_ANGLES(..) => SENSOR_AIRFLOW_ANGLES_DATA::NAME,
36154            Self::SENS_ATMOS(..) => SENS_ATMOS_DATA::NAME,
36155            Self::SENS_BATMON(..) => SENS_BATMON_DATA::NAME,
36156            Self::SENS_MPPT(..) => SENS_MPPT_DATA::NAME,
36157            Self::SENS_POWER(..) => SENS_POWER_DATA::NAME,
36158            Self::SENS_POWER_BOARD(..) => SENS_POWER_BOARD_DATA::NAME,
36159            Self::SERIAL_CONTROL(..) => SERIAL_CONTROL_DATA::NAME,
36160            Self::SERVO_OUTPUT_RAW(..) => SERVO_OUTPUT_RAW_DATA::NAME,
36161            Self::SETUP_SIGNING(..) => SETUP_SIGNING_DATA::NAME,
36162            Self::SET_ACTUATOR_CONTROL_TARGET(..) => SET_ACTUATOR_CONTROL_TARGET_DATA::NAME,
36163            Self::SET_ATTITUDE_TARGET(..) => SET_ATTITUDE_TARGET_DATA::NAME,
36164            Self::SET_GPS_GLOBAL_ORIGIN(..) => SET_GPS_GLOBAL_ORIGIN_DATA::NAME,
36165            Self::SET_HOME_POSITION(..) => SET_HOME_POSITION_DATA::NAME,
36166            Self::SET_MODE(..) => SET_MODE_DATA::NAME,
36167            Self::SET_POSITION_TARGET_GLOBAL_INT(..) => SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME,
36168            Self::SET_POSITION_TARGET_LOCAL_NED(..) => SET_POSITION_TARGET_LOCAL_NED_DATA::NAME,
36169            Self::SIM_STATE(..) => SIM_STATE_DATA::NAME,
36170            Self::SMART_BATTERY_INFO(..) => SMART_BATTERY_INFO_DATA::NAME,
36171            Self::STATUSTEXT(..) => STATUSTEXT_DATA::NAME,
36172            Self::STORAGE_INFORMATION(..) => STORAGE_INFORMATION_DATA::NAME,
36173            Self::SUPPORTED_TUNES(..) => SUPPORTED_TUNES_DATA::NAME,
36174            Self::SYSTEM_TIME(..) => SYSTEM_TIME_DATA::NAME,
36175            Self::SYS_STATUS(..) => SYS_STATUS_DATA::NAME,
36176            Self::TERRAIN_CHECK(..) => TERRAIN_CHECK_DATA::NAME,
36177            Self::TERRAIN_DATA(..) => TERRAIN_DATA_DATA::NAME,
36178            Self::TERRAIN_REPORT(..) => TERRAIN_REPORT_DATA::NAME,
36179            Self::TERRAIN_REQUEST(..) => TERRAIN_REQUEST_DATA::NAME,
36180            Self::TIMESYNC(..) => TIMESYNC_DATA::NAME,
36181            Self::TIME_ESTIMATE_TO_TARGET(..) => TIME_ESTIMATE_TO_TARGET_DATA::NAME,
36182            Self::TRAJECTORY_REPRESENTATION_BEZIER(..) => {
36183                TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME
36184            }
36185            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(..) => {
36186                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME
36187            }
36188            Self::TUNNEL(..) => TUNNEL_DATA::NAME,
36189            Self::UAVCAN_NODE_INFO(..) => UAVCAN_NODE_INFO_DATA::NAME,
36190            Self::UAVCAN_NODE_STATUS(..) => UAVCAN_NODE_STATUS_DATA::NAME,
36191            Self::UTM_GLOBAL_POSITION(..) => UTM_GLOBAL_POSITION_DATA::NAME,
36192            Self::V2_EXTENSION(..) => V2_EXTENSION_DATA::NAME,
36193            Self::VFR_HUD(..) => VFR_HUD_DATA::NAME,
36194            Self::VIBRATION(..) => VIBRATION_DATA::NAME,
36195            Self::VICON_POSITION_ESTIMATE(..) => VICON_POSITION_ESTIMATE_DATA::NAME,
36196            Self::VIDEO_STREAM_INFORMATION(..) => VIDEO_STREAM_INFORMATION_DATA::NAME,
36197            Self::VIDEO_STREAM_STATUS(..) => VIDEO_STREAM_STATUS_DATA::NAME,
36198            Self::VISION_POSITION_ESTIMATE(..) => VISION_POSITION_ESTIMATE_DATA::NAME,
36199            Self::VISION_SPEED_ESTIMATE(..) => VISION_SPEED_ESTIMATE_DATA::NAME,
36200            Self::WHEEL_DISTANCE(..) => WHEEL_DISTANCE_DATA::NAME,
36201            Self::WIFI_CONFIG_AP(..) => WIFI_CONFIG_AP_DATA::NAME,
36202            Self::WINCH_STATUS(..) => WINCH_STATUS_DATA::NAME,
36203            Self::WIND_COV(..) => WIND_COV_DATA::NAME,
36204        }
36205    }
36206    fn message_id(&self) -> u32 {
36207        match self {
36208            Self::ACTUATOR_CONTROL_TARGET(..) => ACTUATOR_CONTROL_TARGET_DATA::ID,
36209            Self::ACTUATOR_OUTPUT_STATUS(..) => ACTUATOR_OUTPUT_STATUS_DATA::ID,
36210            Self::ADSB_VEHICLE(..) => ADSB_VEHICLE_DATA::ID,
36211            Self::AIS_VESSEL(..) => AIS_VESSEL_DATA::ID,
36212            Self::ALTITUDE(..) => ALTITUDE_DATA::ID,
36213            Self::ASLCTRL_DATA(..) => ASLCTRL_DATA_DATA::ID,
36214            Self::ASLCTRL_DEBUG(..) => ASLCTRL_DEBUG_DATA::ID,
36215            Self::ASLUAV_STATUS(..) => ASLUAV_STATUS_DATA::ID,
36216            Self::ASL_OBCTRL(..) => ASL_OBCTRL_DATA::ID,
36217            Self::ATTITUDE(..) => ATTITUDE_DATA::ID,
36218            Self::ATTITUDE_QUATERNION(..) => ATTITUDE_QUATERNION_DATA::ID,
36219            Self::ATTITUDE_QUATERNION_COV(..) => ATTITUDE_QUATERNION_COV_DATA::ID,
36220            Self::ATTITUDE_TARGET(..) => ATTITUDE_TARGET_DATA::ID,
36221            Self::ATT_POS_MOCAP(..) => ATT_POS_MOCAP_DATA::ID,
36222            Self::AUTH_KEY(..) => AUTH_KEY_DATA::ID,
36223            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(..) => {
36224                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID
36225            }
36226            Self::AUTOPILOT_VERSION(..) => AUTOPILOT_VERSION_DATA::ID,
36227            Self::AVAILABLE_MODES(..) => AVAILABLE_MODES_DATA::ID,
36228            Self::AVAILABLE_MODES_MONITOR(..) => AVAILABLE_MODES_MONITOR_DATA::ID,
36229            Self::BATTERY_INFO(..) => BATTERY_INFO_DATA::ID,
36230            Self::BATTERY_STATUS(..) => BATTERY_STATUS_DATA::ID,
36231            Self::BUTTON_CHANGE(..) => BUTTON_CHANGE_DATA::ID,
36232            Self::CAMERA_CAPTURE_STATUS(..) => CAMERA_CAPTURE_STATUS_DATA::ID,
36233            Self::CAMERA_FOV_STATUS(..) => CAMERA_FOV_STATUS_DATA::ID,
36234            Self::CAMERA_IMAGE_CAPTURED(..) => CAMERA_IMAGE_CAPTURED_DATA::ID,
36235            Self::CAMERA_INFORMATION(..) => CAMERA_INFORMATION_DATA::ID,
36236            Self::CAMERA_SETTINGS(..) => CAMERA_SETTINGS_DATA::ID,
36237            Self::CAMERA_THERMAL_RANGE(..) => CAMERA_THERMAL_RANGE_DATA::ID,
36238            Self::CAMERA_TRACKING_GEO_STATUS(..) => CAMERA_TRACKING_GEO_STATUS_DATA::ID,
36239            Self::CAMERA_TRACKING_IMAGE_STATUS(..) => CAMERA_TRACKING_IMAGE_STATUS_DATA::ID,
36240            Self::CAMERA_TRIGGER(..) => CAMERA_TRIGGER_DATA::ID,
36241            Self::CANFD_FRAME(..) => CANFD_FRAME_DATA::ID,
36242            Self::CAN_FILTER_MODIFY(..) => CAN_FILTER_MODIFY_DATA::ID,
36243            Self::CAN_FRAME(..) => CAN_FRAME_DATA::ID,
36244            Self::CELLULAR_CONFIG(..) => CELLULAR_CONFIG_DATA::ID,
36245            Self::CELLULAR_STATUS(..) => CELLULAR_STATUS_DATA::ID,
36246            Self::CHANGE_OPERATOR_CONTROL(..) => CHANGE_OPERATOR_CONTROL_DATA::ID,
36247            Self::CHANGE_OPERATOR_CONTROL_ACK(..) => CHANGE_OPERATOR_CONTROL_ACK_DATA::ID,
36248            Self::COLLISION(..) => COLLISION_DATA::ID,
36249            Self::COMMAND_ACK(..) => COMMAND_ACK_DATA::ID,
36250            Self::COMMAND_CANCEL(..) => COMMAND_CANCEL_DATA::ID,
36251            Self::COMMAND_INT(..) => COMMAND_INT_DATA::ID,
36252            Self::COMMAND_INT_STAMPED(..) => COMMAND_INT_STAMPED_DATA::ID,
36253            Self::COMMAND_LONG(..) => COMMAND_LONG_DATA::ID,
36254            Self::COMMAND_LONG_STAMPED(..) => COMMAND_LONG_STAMPED_DATA::ID,
36255            Self::COMPONENT_INFORMATION(..) => COMPONENT_INFORMATION_DATA::ID,
36256            Self::COMPONENT_INFORMATION_BASIC(..) => COMPONENT_INFORMATION_BASIC_DATA::ID,
36257            Self::COMPONENT_METADATA(..) => COMPONENT_METADATA_DATA::ID,
36258            Self::CONTROL_SYSTEM_STATE(..) => CONTROL_SYSTEM_STATE_DATA::ID,
36259            Self::CURRENT_EVENT_SEQUENCE(..) => CURRENT_EVENT_SEQUENCE_DATA::ID,
36260            Self::CURRENT_MODE(..) => CURRENT_MODE_DATA::ID,
36261            Self::DATA_STREAM(..) => DATA_STREAM_DATA::ID,
36262            Self::DATA_TRANSMISSION_HANDSHAKE(..) => DATA_TRANSMISSION_HANDSHAKE_DATA::ID,
36263            Self::DEBUG(..) => DEBUG_DATA::ID,
36264            Self::DEBUG_FLOAT_ARRAY(..) => DEBUG_FLOAT_ARRAY_DATA::ID,
36265            Self::DEBUG_VECT(..) => DEBUG_VECT_DATA::ID,
36266            Self::DISTANCE_SENSOR(..) => DISTANCE_SENSOR_DATA::ID,
36267            Self::EFI_STATUS(..) => EFI_STATUS_DATA::ID,
36268            Self::EKF_EXT(..) => EKF_EXT_DATA::ID,
36269            Self::ENCAPSULATED_DATA(..) => ENCAPSULATED_DATA_DATA::ID,
36270            Self::ESC_INFO(..) => ESC_INFO_DATA::ID,
36271            Self::ESC_STATUS(..) => ESC_STATUS_DATA::ID,
36272            Self::ESTIMATOR_STATUS(..) => ESTIMATOR_STATUS_DATA::ID,
36273            Self::EVENT(..) => EVENT_DATA::ID,
36274            Self::EXTENDED_SYS_STATE(..) => EXTENDED_SYS_STATE_DATA::ID,
36275            Self::FENCE_STATUS(..) => FENCE_STATUS_DATA::ID,
36276            Self::FILE_TRANSFER_PROTOCOL(..) => FILE_TRANSFER_PROTOCOL_DATA::ID,
36277            Self::FLIGHT_INFORMATION(..) => FLIGHT_INFORMATION_DATA::ID,
36278            Self::FOLLOW_TARGET(..) => FOLLOW_TARGET_DATA::ID,
36279            Self::FUEL_STATUS(..) => FUEL_STATUS_DATA::ID,
36280            Self::FW_SOARING_DATA(..) => FW_SOARING_DATA_DATA::ID,
36281            Self::GENERATOR_STATUS(..) => GENERATOR_STATUS_DATA::ID,
36282            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(..) => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID,
36283            Self::GIMBAL_DEVICE_INFORMATION(..) => GIMBAL_DEVICE_INFORMATION_DATA::ID,
36284            Self::GIMBAL_DEVICE_SET_ATTITUDE(..) => GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID,
36285            Self::GIMBAL_MANAGER_INFORMATION(..) => GIMBAL_MANAGER_INFORMATION_DATA::ID,
36286            Self::GIMBAL_MANAGER_SET_ATTITUDE(..) => GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID,
36287            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(..) => {
36288                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID
36289            }
36290            Self::GIMBAL_MANAGER_SET_PITCHYAW(..) => GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID,
36291            Self::GIMBAL_MANAGER_STATUS(..) => GIMBAL_MANAGER_STATUS_DATA::ID,
36292            Self::GLOBAL_POSITION_INT(..) => GLOBAL_POSITION_INT_DATA::ID,
36293            Self::GLOBAL_POSITION_INT_COV(..) => GLOBAL_POSITION_INT_COV_DATA::ID,
36294            Self::GLOBAL_VISION_POSITION_ESTIMATE(..) => GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID,
36295            Self::GPS2_RAW(..) => GPS2_RAW_DATA::ID,
36296            Self::GPS2_RTK(..) => GPS2_RTK_DATA::ID,
36297            Self::GPS_GLOBAL_ORIGIN(..) => GPS_GLOBAL_ORIGIN_DATA::ID,
36298            Self::GPS_INJECT_DATA(..) => GPS_INJECT_DATA_DATA::ID,
36299            Self::GPS_INPUT(..) => GPS_INPUT_DATA::ID,
36300            Self::GPS_RAW_INT(..) => GPS_RAW_INT_DATA::ID,
36301            Self::GPS_RTCM_DATA(..) => GPS_RTCM_DATA_DATA::ID,
36302            Self::GPS_RTK(..) => GPS_RTK_DATA::ID,
36303            Self::GPS_STATUS(..) => GPS_STATUS_DATA::ID,
36304            Self::GSM_LINK_STATUS(..) => GSM_LINK_STATUS_DATA::ID,
36305            Self::HEARTBEAT(..) => HEARTBEAT_DATA::ID,
36306            Self::HIGHRES_IMU(..) => HIGHRES_IMU_DATA::ID,
36307            Self::HIGH_LATENCY(..) => HIGH_LATENCY_DATA::ID,
36308            Self::HIGH_LATENCY2(..) => HIGH_LATENCY2_DATA::ID,
36309            Self::HIL_ACTUATOR_CONTROLS(..) => HIL_ACTUATOR_CONTROLS_DATA::ID,
36310            Self::HIL_CONTROLS(..) => HIL_CONTROLS_DATA::ID,
36311            Self::HIL_GPS(..) => HIL_GPS_DATA::ID,
36312            Self::HIL_OPTICAL_FLOW(..) => HIL_OPTICAL_FLOW_DATA::ID,
36313            Self::HIL_RC_INPUTS_RAW(..) => HIL_RC_INPUTS_RAW_DATA::ID,
36314            Self::HIL_SENSOR(..) => HIL_SENSOR_DATA::ID,
36315            Self::HIL_STATE(..) => HIL_STATE_DATA::ID,
36316            Self::HIL_STATE_QUATERNION(..) => HIL_STATE_QUATERNION_DATA::ID,
36317            Self::HOME_POSITION(..) => HOME_POSITION_DATA::ID,
36318            Self::HYGROMETER_SENSOR(..) => HYGROMETER_SENSOR_DATA::ID,
36319            Self::ILLUMINATOR_STATUS(..) => ILLUMINATOR_STATUS_DATA::ID,
36320            Self::ISBD_LINK_STATUS(..) => ISBD_LINK_STATUS_DATA::ID,
36321            Self::LANDING_TARGET(..) => LANDING_TARGET_DATA::ID,
36322            Self::LINK_NODE_STATUS(..) => LINK_NODE_STATUS_DATA::ID,
36323            Self::LOCAL_POSITION_NED(..) => LOCAL_POSITION_NED_DATA::ID,
36324            Self::LOCAL_POSITION_NED_COV(..) => LOCAL_POSITION_NED_COV_DATA::ID,
36325            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(..) => {
36326                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID
36327            }
36328            Self::LOGGING_ACK(..) => LOGGING_ACK_DATA::ID,
36329            Self::LOGGING_DATA(..) => LOGGING_DATA_DATA::ID,
36330            Self::LOGGING_DATA_ACKED(..) => LOGGING_DATA_ACKED_DATA::ID,
36331            Self::LOG_DATA(..) => LOG_DATA_DATA::ID,
36332            Self::LOG_ENTRY(..) => LOG_ENTRY_DATA::ID,
36333            Self::LOG_ERASE(..) => LOG_ERASE_DATA::ID,
36334            Self::LOG_REQUEST_DATA(..) => LOG_REQUEST_DATA_DATA::ID,
36335            Self::LOG_REQUEST_END(..) => LOG_REQUEST_END_DATA::ID,
36336            Self::LOG_REQUEST_LIST(..) => LOG_REQUEST_LIST_DATA::ID,
36337            Self::MAG_CAL_REPORT(..) => MAG_CAL_REPORT_DATA::ID,
36338            Self::MANUAL_CONTROL(..) => MANUAL_CONTROL_DATA::ID,
36339            Self::MANUAL_SETPOINT(..) => MANUAL_SETPOINT_DATA::ID,
36340            Self::MEMORY_VECT(..) => MEMORY_VECT_DATA::ID,
36341            Self::MESSAGE_INTERVAL(..) => MESSAGE_INTERVAL_DATA::ID,
36342            Self::MISSION_ACK(..) => MISSION_ACK_DATA::ID,
36343            Self::MISSION_CLEAR_ALL(..) => MISSION_CLEAR_ALL_DATA::ID,
36344            Self::MISSION_COUNT(..) => MISSION_COUNT_DATA::ID,
36345            Self::MISSION_CURRENT(..) => MISSION_CURRENT_DATA::ID,
36346            Self::MISSION_ITEM(..) => MISSION_ITEM_DATA::ID,
36347            Self::MISSION_ITEM_INT(..) => MISSION_ITEM_INT_DATA::ID,
36348            Self::MISSION_ITEM_REACHED(..) => MISSION_ITEM_REACHED_DATA::ID,
36349            Self::MISSION_REQUEST(..) => MISSION_REQUEST_DATA::ID,
36350            Self::MISSION_REQUEST_INT(..) => MISSION_REQUEST_INT_DATA::ID,
36351            Self::MISSION_REQUEST_LIST(..) => MISSION_REQUEST_LIST_DATA::ID,
36352            Self::MISSION_REQUEST_PARTIAL_LIST(..) => MISSION_REQUEST_PARTIAL_LIST_DATA::ID,
36353            Self::MISSION_SET_CURRENT(..) => MISSION_SET_CURRENT_DATA::ID,
36354            Self::MISSION_WRITE_PARTIAL_LIST(..) => MISSION_WRITE_PARTIAL_LIST_DATA::ID,
36355            Self::MOUNT_ORIENTATION(..) => MOUNT_ORIENTATION_DATA::ID,
36356            Self::NAMED_VALUE_FLOAT(..) => NAMED_VALUE_FLOAT_DATA::ID,
36357            Self::NAMED_VALUE_INT(..) => NAMED_VALUE_INT_DATA::ID,
36358            Self::NAV_CONTROLLER_OUTPUT(..) => NAV_CONTROLLER_OUTPUT_DATA::ID,
36359            Self::OBSTACLE_DISTANCE(..) => OBSTACLE_DISTANCE_DATA::ID,
36360            Self::ODOMETRY(..) => ODOMETRY_DATA::ID,
36361            Self::ONBOARD_COMPUTER_STATUS(..) => ONBOARD_COMPUTER_STATUS_DATA::ID,
36362            Self::OPEN_DRONE_ID_ARM_STATUS(..) => OPEN_DRONE_ID_ARM_STATUS_DATA::ID,
36363            Self::OPEN_DRONE_ID_AUTHENTICATION(..) => OPEN_DRONE_ID_AUTHENTICATION_DATA::ID,
36364            Self::OPEN_DRONE_ID_BASIC_ID(..) => OPEN_DRONE_ID_BASIC_ID_DATA::ID,
36365            Self::OPEN_DRONE_ID_LOCATION(..) => OPEN_DRONE_ID_LOCATION_DATA::ID,
36366            Self::OPEN_DRONE_ID_MESSAGE_PACK(..) => OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID,
36367            Self::OPEN_DRONE_ID_OPERATOR_ID(..) => OPEN_DRONE_ID_OPERATOR_ID_DATA::ID,
36368            Self::OPEN_DRONE_ID_SELF_ID(..) => OPEN_DRONE_ID_SELF_ID_DATA::ID,
36369            Self::OPEN_DRONE_ID_SYSTEM(..) => OPEN_DRONE_ID_SYSTEM_DATA::ID,
36370            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(..) => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID,
36371            Self::OPTICAL_FLOW(..) => OPTICAL_FLOW_DATA::ID,
36372            Self::OPTICAL_FLOW_RAD(..) => OPTICAL_FLOW_RAD_DATA::ID,
36373            Self::ORBIT_EXECUTION_STATUS(..) => ORBIT_EXECUTION_STATUS_DATA::ID,
36374            Self::PARAM_EXT_ACK(..) => PARAM_EXT_ACK_DATA::ID,
36375            Self::PARAM_EXT_REQUEST_LIST(..) => PARAM_EXT_REQUEST_LIST_DATA::ID,
36376            Self::PARAM_EXT_REQUEST_READ(..) => PARAM_EXT_REQUEST_READ_DATA::ID,
36377            Self::PARAM_EXT_SET(..) => PARAM_EXT_SET_DATA::ID,
36378            Self::PARAM_EXT_VALUE(..) => PARAM_EXT_VALUE_DATA::ID,
36379            Self::PARAM_MAP_RC(..) => PARAM_MAP_RC_DATA::ID,
36380            Self::PARAM_REQUEST_LIST(..) => PARAM_REQUEST_LIST_DATA::ID,
36381            Self::PARAM_REQUEST_READ(..) => PARAM_REQUEST_READ_DATA::ID,
36382            Self::PARAM_SET(..) => PARAM_SET_DATA::ID,
36383            Self::PARAM_VALUE(..) => PARAM_VALUE_DATA::ID,
36384            Self::PING(..) => PING_DATA::ID,
36385            Self::PLAY_TUNE(..) => PLAY_TUNE_DATA::ID,
36386            Self::PLAY_TUNE_V2(..) => PLAY_TUNE_V2_DATA::ID,
36387            Self::POSITION_TARGET_GLOBAL_INT(..) => POSITION_TARGET_GLOBAL_INT_DATA::ID,
36388            Self::POSITION_TARGET_LOCAL_NED(..) => POSITION_TARGET_LOCAL_NED_DATA::ID,
36389            Self::POWER_STATUS(..) => POWER_STATUS_DATA::ID,
36390            Self::PROTOCOL_VERSION(..) => PROTOCOL_VERSION_DATA::ID,
36391            Self::RADIO_STATUS(..) => RADIO_STATUS_DATA::ID,
36392            Self::RAW_IMU(..) => RAW_IMU_DATA::ID,
36393            Self::RAW_PRESSURE(..) => RAW_PRESSURE_DATA::ID,
36394            Self::RAW_RPM(..) => RAW_RPM_DATA::ID,
36395            Self::RC_CHANNELS(..) => RC_CHANNELS_DATA::ID,
36396            Self::RC_CHANNELS_OVERRIDE(..) => RC_CHANNELS_OVERRIDE_DATA::ID,
36397            Self::RC_CHANNELS_RAW(..) => RC_CHANNELS_RAW_DATA::ID,
36398            Self::RC_CHANNELS_SCALED(..) => RC_CHANNELS_SCALED_DATA::ID,
36399            Self::REQUEST_DATA_STREAM(..) => REQUEST_DATA_STREAM_DATA::ID,
36400            Self::REQUEST_EVENT(..) => REQUEST_EVENT_DATA::ID,
36401            Self::RESOURCE_REQUEST(..) => RESOURCE_REQUEST_DATA::ID,
36402            Self::RESPONSE_EVENT_ERROR(..) => RESPONSE_EVENT_ERROR_DATA::ID,
36403            Self::SAFETY_ALLOWED_AREA(..) => SAFETY_ALLOWED_AREA_DATA::ID,
36404            Self::SAFETY_SET_ALLOWED_AREA(..) => SAFETY_SET_ALLOWED_AREA_DATA::ID,
36405            Self::SATCOM_LINK_STATUS(..) => SATCOM_LINK_STATUS_DATA::ID,
36406            Self::SCALED_IMU(..) => SCALED_IMU_DATA::ID,
36407            Self::SCALED_IMU2(..) => SCALED_IMU2_DATA::ID,
36408            Self::SCALED_IMU3(..) => SCALED_IMU3_DATA::ID,
36409            Self::SCALED_PRESSURE(..) => SCALED_PRESSURE_DATA::ID,
36410            Self::SCALED_PRESSURE2(..) => SCALED_PRESSURE2_DATA::ID,
36411            Self::SCALED_PRESSURE3(..) => SCALED_PRESSURE3_DATA::ID,
36412            Self::SENSORPOD_STATUS(..) => SENSORPOD_STATUS_DATA::ID,
36413            Self::SENSOR_AIRFLOW_ANGLES(..) => SENSOR_AIRFLOW_ANGLES_DATA::ID,
36414            Self::SENS_ATMOS(..) => SENS_ATMOS_DATA::ID,
36415            Self::SENS_BATMON(..) => SENS_BATMON_DATA::ID,
36416            Self::SENS_MPPT(..) => SENS_MPPT_DATA::ID,
36417            Self::SENS_POWER(..) => SENS_POWER_DATA::ID,
36418            Self::SENS_POWER_BOARD(..) => SENS_POWER_BOARD_DATA::ID,
36419            Self::SERIAL_CONTROL(..) => SERIAL_CONTROL_DATA::ID,
36420            Self::SERVO_OUTPUT_RAW(..) => SERVO_OUTPUT_RAW_DATA::ID,
36421            Self::SETUP_SIGNING(..) => SETUP_SIGNING_DATA::ID,
36422            Self::SET_ACTUATOR_CONTROL_TARGET(..) => SET_ACTUATOR_CONTROL_TARGET_DATA::ID,
36423            Self::SET_ATTITUDE_TARGET(..) => SET_ATTITUDE_TARGET_DATA::ID,
36424            Self::SET_GPS_GLOBAL_ORIGIN(..) => SET_GPS_GLOBAL_ORIGIN_DATA::ID,
36425            Self::SET_HOME_POSITION(..) => SET_HOME_POSITION_DATA::ID,
36426            Self::SET_MODE(..) => SET_MODE_DATA::ID,
36427            Self::SET_POSITION_TARGET_GLOBAL_INT(..) => SET_POSITION_TARGET_GLOBAL_INT_DATA::ID,
36428            Self::SET_POSITION_TARGET_LOCAL_NED(..) => SET_POSITION_TARGET_LOCAL_NED_DATA::ID,
36429            Self::SIM_STATE(..) => SIM_STATE_DATA::ID,
36430            Self::SMART_BATTERY_INFO(..) => SMART_BATTERY_INFO_DATA::ID,
36431            Self::STATUSTEXT(..) => STATUSTEXT_DATA::ID,
36432            Self::STORAGE_INFORMATION(..) => STORAGE_INFORMATION_DATA::ID,
36433            Self::SUPPORTED_TUNES(..) => SUPPORTED_TUNES_DATA::ID,
36434            Self::SYSTEM_TIME(..) => SYSTEM_TIME_DATA::ID,
36435            Self::SYS_STATUS(..) => SYS_STATUS_DATA::ID,
36436            Self::TERRAIN_CHECK(..) => TERRAIN_CHECK_DATA::ID,
36437            Self::TERRAIN_DATA(..) => TERRAIN_DATA_DATA::ID,
36438            Self::TERRAIN_REPORT(..) => TERRAIN_REPORT_DATA::ID,
36439            Self::TERRAIN_REQUEST(..) => TERRAIN_REQUEST_DATA::ID,
36440            Self::TIMESYNC(..) => TIMESYNC_DATA::ID,
36441            Self::TIME_ESTIMATE_TO_TARGET(..) => TIME_ESTIMATE_TO_TARGET_DATA::ID,
36442            Self::TRAJECTORY_REPRESENTATION_BEZIER(..) => TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID,
36443            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(..) => {
36444                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID
36445            }
36446            Self::TUNNEL(..) => TUNNEL_DATA::ID,
36447            Self::UAVCAN_NODE_INFO(..) => UAVCAN_NODE_INFO_DATA::ID,
36448            Self::UAVCAN_NODE_STATUS(..) => UAVCAN_NODE_STATUS_DATA::ID,
36449            Self::UTM_GLOBAL_POSITION(..) => UTM_GLOBAL_POSITION_DATA::ID,
36450            Self::V2_EXTENSION(..) => V2_EXTENSION_DATA::ID,
36451            Self::VFR_HUD(..) => VFR_HUD_DATA::ID,
36452            Self::VIBRATION(..) => VIBRATION_DATA::ID,
36453            Self::VICON_POSITION_ESTIMATE(..) => VICON_POSITION_ESTIMATE_DATA::ID,
36454            Self::VIDEO_STREAM_INFORMATION(..) => VIDEO_STREAM_INFORMATION_DATA::ID,
36455            Self::VIDEO_STREAM_STATUS(..) => VIDEO_STREAM_STATUS_DATA::ID,
36456            Self::VISION_POSITION_ESTIMATE(..) => VISION_POSITION_ESTIMATE_DATA::ID,
36457            Self::VISION_SPEED_ESTIMATE(..) => VISION_SPEED_ESTIMATE_DATA::ID,
36458            Self::WHEEL_DISTANCE(..) => WHEEL_DISTANCE_DATA::ID,
36459            Self::WIFI_CONFIG_AP(..) => WIFI_CONFIG_AP_DATA::ID,
36460            Self::WINCH_STATUS(..) => WINCH_STATUS_DATA::ID,
36461            Self::WIND_COV(..) => WIND_COV_DATA::ID,
36462        }
36463    }
36464    fn message_id_from_name(name: &str) -> Option<u32> {
36465        match name {
36466            ACTUATOR_CONTROL_TARGET_DATA::NAME => Some(ACTUATOR_CONTROL_TARGET_DATA::ID),
36467            ACTUATOR_OUTPUT_STATUS_DATA::NAME => Some(ACTUATOR_OUTPUT_STATUS_DATA::ID),
36468            ADSB_VEHICLE_DATA::NAME => Some(ADSB_VEHICLE_DATA::ID),
36469            AIS_VESSEL_DATA::NAME => Some(AIS_VESSEL_DATA::ID),
36470            ALTITUDE_DATA::NAME => Some(ALTITUDE_DATA::ID),
36471            ASLCTRL_DATA_DATA::NAME => Some(ASLCTRL_DATA_DATA::ID),
36472            ASLCTRL_DEBUG_DATA::NAME => Some(ASLCTRL_DEBUG_DATA::ID),
36473            ASLUAV_STATUS_DATA::NAME => Some(ASLUAV_STATUS_DATA::ID),
36474            ASL_OBCTRL_DATA::NAME => Some(ASL_OBCTRL_DATA::ID),
36475            ATTITUDE_DATA::NAME => Some(ATTITUDE_DATA::ID),
36476            ATTITUDE_QUATERNION_DATA::NAME => Some(ATTITUDE_QUATERNION_DATA::ID),
36477            ATTITUDE_QUATERNION_COV_DATA::NAME => Some(ATTITUDE_QUATERNION_COV_DATA::ID),
36478            ATTITUDE_TARGET_DATA::NAME => Some(ATTITUDE_TARGET_DATA::ID),
36479            ATT_POS_MOCAP_DATA::NAME => Some(ATT_POS_MOCAP_DATA::ID),
36480            AUTH_KEY_DATA::NAME => Some(AUTH_KEY_DATA::ID),
36481            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME => {
36482                Some(AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID)
36483            }
36484            AUTOPILOT_VERSION_DATA::NAME => Some(AUTOPILOT_VERSION_DATA::ID),
36485            AVAILABLE_MODES_DATA::NAME => Some(AVAILABLE_MODES_DATA::ID),
36486            AVAILABLE_MODES_MONITOR_DATA::NAME => Some(AVAILABLE_MODES_MONITOR_DATA::ID),
36487            BATTERY_INFO_DATA::NAME => Some(BATTERY_INFO_DATA::ID),
36488            BATTERY_STATUS_DATA::NAME => Some(BATTERY_STATUS_DATA::ID),
36489            BUTTON_CHANGE_DATA::NAME => Some(BUTTON_CHANGE_DATA::ID),
36490            CAMERA_CAPTURE_STATUS_DATA::NAME => Some(CAMERA_CAPTURE_STATUS_DATA::ID),
36491            CAMERA_FOV_STATUS_DATA::NAME => Some(CAMERA_FOV_STATUS_DATA::ID),
36492            CAMERA_IMAGE_CAPTURED_DATA::NAME => Some(CAMERA_IMAGE_CAPTURED_DATA::ID),
36493            CAMERA_INFORMATION_DATA::NAME => Some(CAMERA_INFORMATION_DATA::ID),
36494            CAMERA_SETTINGS_DATA::NAME => Some(CAMERA_SETTINGS_DATA::ID),
36495            CAMERA_THERMAL_RANGE_DATA::NAME => Some(CAMERA_THERMAL_RANGE_DATA::ID),
36496            CAMERA_TRACKING_GEO_STATUS_DATA::NAME => Some(CAMERA_TRACKING_GEO_STATUS_DATA::ID),
36497            CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME => Some(CAMERA_TRACKING_IMAGE_STATUS_DATA::ID),
36498            CAMERA_TRIGGER_DATA::NAME => Some(CAMERA_TRIGGER_DATA::ID),
36499            CANFD_FRAME_DATA::NAME => Some(CANFD_FRAME_DATA::ID),
36500            CAN_FILTER_MODIFY_DATA::NAME => Some(CAN_FILTER_MODIFY_DATA::ID),
36501            CAN_FRAME_DATA::NAME => Some(CAN_FRAME_DATA::ID),
36502            CELLULAR_CONFIG_DATA::NAME => Some(CELLULAR_CONFIG_DATA::ID),
36503            CELLULAR_STATUS_DATA::NAME => Some(CELLULAR_STATUS_DATA::ID),
36504            CHANGE_OPERATOR_CONTROL_DATA::NAME => Some(CHANGE_OPERATOR_CONTROL_DATA::ID),
36505            CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME => Some(CHANGE_OPERATOR_CONTROL_ACK_DATA::ID),
36506            COLLISION_DATA::NAME => Some(COLLISION_DATA::ID),
36507            COMMAND_ACK_DATA::NAME => Some(COMMAND_ACK_DATA::ID),
36508            COMMAND_CANCEL_DATA::NAME => Some(COMMAND_CANCEL_DATA::ID),
36509            COMMAND_INT_DATA::NAME => Some(COMMAND_INT_DATA::ID),
36510            COMMAND_INT_STAMPED_DATA::NAME => Some(COMMAND_INT_STAMPED_DATA::ID),
36511            COMMAND_LONG_DATA::NAME => Some(COMMAND_LONG_DATA::ID),
36512            COMMAND_LONG_STAMPED_DATA::NAME => Some(COMMAND_LONG_STAMPED_DATA::ID),
36513            COMPONENT_INFORMATION_DATA::NAME => Some(COMPONENT_INFORMATION_DATA::ID),
36514            COMPONENT_INFORMATION_BASIC_DATA::NAME => Some(COMPONENT_INFORMATION_BASIC_DATA::ID),
36515            COMPONENT_METADATA_DATA::NAME => Some(COMPONENT_METADATA_DATA::ID),
36516            CONTROL_SYSTEM_STATE_DATA::NAME => Some(CONTROL_SYSTEM_STATE_DATA::ID),
36517            CURRENT_EVENT_SEQUENCE_DATA::NAME => Some(CURRENT_EVENT_SEQUENCE_DATA::ID),
36518            CURRENT_MODE_DATA::NAME => Some(CURRENT_MODE_DATA::ID),
36519            DATA_STREAM_DATA::NAME => Some(DATA_STREAM_DATA::ID),
36520            DATA_TRANSMISSION_HANDSHAKE_DATA::NAME => Some(DATA_TRANSMISSION_HANDSHAKE_DATA::ID),
36521            DEBUG_DATA::NAME => Some(DEBUG_DATA::ID),
36522            DEBUG_FLOAT_ARRAY_DATA::NAME => Some(DEBUG_FLOAT_ARRAY_DATA::ID),
36523            DEBUG_VECT_DATA::NAME => Some(DEBUG_VECT_DATA::ID),
36524            DISTANCE_SENSOR_DATA::NAME => Some(DISTANCE_SENSOR_DATA::ID),
36525            EFI_STATUS_DATA::NAME => Some(EFI_STATUS_DATA::ID),
36526            EKF_EXT_DATA::NAME => Some(EKF_EXT_DATA::ID),
36527            ENCAPSULATED_DATA_DATA::NAME => Some(ENCAPSULATED_DATA_DATA::ID),
36528            ESC_INFO_DATA::NAME => Some(ESC_INFO_DATA::ID),
36529            ESC_STATUS_DATA::NAME => Some(ESC_STATUS_DATA::ID),
36530            ESTIMATOR_STATUS_DATA::NAME => Some(ESTIMATOR_STATUS_DATA::ID),
36531            EVENT_DATA::NAME => Some(EVENT_DATA::ID),
36532            EXTENDED_SYS_STATE_DATA::NAME => Some(EXTENDED_SYS_STATE_DATA::ID),
36533            FENCE_STATUS_DATA::NAME => Some(FENCE_STATUS_DATA::ID),
36534            FILE_TRANSFER_PROTOCOL_DATA::NAME => Some(FILE_TRANSFER_PROTOCOL_DATA::ID),
36535            FLIGHT_INFORMATION_DATA::NAME => Some(FLIGHT_INFORMATION_DATA::ID),
36536            FOLLOW_TARGET_DATA::NAME => Some(FOLLOW_TARGET_DATA::ID),
36537            FUEL_STATUS_DATA::NAME => Some(FUEL_STATUS_DATA::ID),
36538            FW_SOARING_DATA_DATA::NAME => Some(FW_SOARING_DATA_DATA::ID),
36539            GENERATOR_STATUS_DATA::NAME => Some(GENERATOR_STATUS_DATA::ID),
36540            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME => {
36541                Some(GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID)
36542            }
36543            GIMBAL_DEVICE_INFORMATION_DATA::NAME => Some(GIMBAL_DEVICE_INFORMATION_DATA::ID),
36544            GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME => Some(GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID),
36545            GIMBAL_MANAGER_INFORMATION_DATA::NAME => Some(GIMBAL_MANAGER_INFORMATION_DATA::ID),
36546            GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME => Some(GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID),
36547            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME => {
36548                Some(GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID)
36549            }
36550            GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME => Some(GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID),
36551            GIMBAL_MANAGER_STATUS_DATA::NAME => Some(GIMBAL_MANAGER_STATUS_DATA::ID),
36552            GLOBAL_POSITION_INT_DATA::NAME => Some(GLOBAL_POSITION_INT_DATA::ID),
36553            GLOBAL_POSITION_INT_COV_DATA::NAME => Some(GLOBAL_POSITION_INT_COV_DATA::ID),
36554            GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME => {
36555                Some(GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID)
36556            }
36557            GPS2_RAW_DATA::NAME => Some(GPS2_RAW_DATA::ID),
36558            GPS2_RTK_DATA::NAME => Some(GPS2_RTK_DATA::ID),
36559            GPS_GLOBAL_ORIGIN_DATA::NAME => Some(GPS_GLOBAL_ORIGIN_DATA::ID),
36560            GPS_INJECT_DATA_DATA::NAME => Some(GPS_INJECT_DATA_DATA::ID),
36561            GPS_INPUT_DATA::NAME => Some(GPS_INPUT_DATA::ID),
36562            GPS_RAW_INT_DATA::NAME => Some(GPS_RAW_INT_DATA::ID),
36563            GPS_RTCM_DATA_DATA::NAME => Some(GPS_RTCM_DATA_DATA::ID),
36564            GPS_RTK_DATA::NAME => Some(GPS_RTK_DATA::ID),
36565            GPS_STATUS_DATA::NAME => Some(GPS_STATUS_DATA::ID),
36566            GSM_LINK_STATUS_DATA::NAME => Some(GSM_LINK_STATUS_DATA::ID),
36567            HEARTBEAT_DATA::NAME => Some(HEARTBEAT_DATA::ID),
36568            HIGHRES_IMU_DATA::NAME => Some(HIGHRES_IMU_DATA::ID),
36569            HIGH_LATENCY_DATA::NAME => Some(HIGH_LATENCY_DATA::ID),
36570            HIGH_LATENCY2_DATA::NAME => Some(HIGH_LATENCY2_DATA::ID),
36571            HIL_ACTUATOR_CONTROLS_DATA::NAME => Some(HIL_ACTUATOR_CONTROLS_DATA::ID),
36572            HIL_CONTROLS_DATA::NAME => Some(HIL_CONTROLS_DATA::ID),
36573            HIL_GPS_DATA::NAME => Some(HIL_GPS_DATA::ID),
36574            HIL_OPTICAL_FLOW_DATA::NAME => Some(HIL_OPTICAL_FLOW_DATA::ID),
36575            HIL_RC_INPUTS_RAW_DATA::NAME => Some(HIL_RC_INPUTS_RAW_DATA::ID),
36576            HIL_SENSOR_DATA::NAME => Some(HIL_SENSOR_DATA::ID),
36577            HIL_STATE_DATA::NAME => Some(HIL_STATE_DATA::ID),
36578            HIL_STATE_QUATERNION_DATA::NAME => Some(HIL_STATE_QUATERNION_DATA::ID),
36579            HOME_POSITION_DATA::NAME => Some(HOME_POSITION_DATA::ID),
36580            HYGROMETER_SENSOR_DATA::NAME => Some(HYGROMETER_SENSOR_DATA::ID),
36581            ILLUMINATOR_STATUS_DATA::NAME => Some(ILLUMINATOR_STATUS_DATA::ID),
36582            ISBD_LINK_STATUS_DATA::NAME => Some(ISBD_LINK_STATUS_DATA::ID),
36583            LANDING_TARGET_DATA::NAME => Some(LANDING_TARGET_DATA::ID),
36584            LINK_NODE_STATUS_DATA::NAME => Some(LINK_NODE_STATUS_DATA::ID),
36585            LOCAL_POSITION_NED_DATA::NAME => Some(LOCAL_POSITION_NED_DATA::ID),
36586            LOCAL_POSITION_NED_COV_DATA::NAME => Some(LOCAL_POSITION_NED_COV_DATA::ID),
36587            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME => {
36588                Some(LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID)
36589            }
36590            LOGGING_ACK_DATA::NAME => Some(LOGGING_ACK_DATA::ID),
36591            LOGGING_DATA_DATA::NAME => Some(LOGGING_DATA_DATA::ID),
36592            LOGGING_DATA_ACKED_DATA::NAME => Some(LOGGING_DATA_ACKED_DATA::ID),
36593            LOG_DATA_DATA::NAME => Some(LOG_DATA_DATA::ID),
36594            LOG_ENTRY_DATA::NAME => Some(LOG_ENTRY_DATA::ID),
36595            LOG_ERASE_DATA::NAME => Some(LOG_ERASE_DATA::ID),
36596            LOG_REQUEST_DATA_DATA::NAME => Some(LOG_REQUEST_DATA_DATA::ID),
36597            LOG_REQUEST_END_DATA::NAME => Some(LOG_REQUEST_END_DATA::ID),
36598            LOG_REQUEST_LIST_DATA::NAME => Some(LOG_REQUEST_LIST_DATA::ID),
36599            MAG_CAL_REPORT_DATA::NAME => Some(MAG_CAL_REPORT_DATA::ID),
36600            MANUAL_CONTROL_DATA::NAME => Some(MANUAL_CONTROL_DATA::ID),
36601            MANUAL_SETPOINT_DATA::NAME => Some(MANUAL_SETPOINT_DATA::ID),
36602            MEMORY_VECT_DATA::NAME => Some(MEMORY_VECT_DATA::ID),
36603            MESSAGE_INTERVAL_DATA::NAME => Some(MESSAGE_INTERVAL_DATA::ID),
36604            MISSION_ACK_DATA::NAME => Some(MISSION_ACK_DATA::ID),
36605            MISSION_CLEAR_ALL_DATA::NAME => Some(MISSION_CLEAR_ALL_DATA::ID),
36606            MISSION_COUNT_DATA::NAME => Some(MISSION_COUNT_DATA::ID),
36607            MISSION_CURRENT_DATA::NAME => Some(MISSION_CURRENT_DATA::ID),
36608            MISSION_ITEM_DATA::NAME => Some(MISSION_ITEM_DATA::ID),
36609            MISSION_ITEM_INT_DATA::NAME => Some(MISSION_ITEM_INT_DATA::ID),
36610            MISSION_ITEM_REACHED_DATA::NAME => Some(MISSION_ITEM_REACHED_DATA::ID),
36611            MISSION_REQUEST_DATA::NAME => Some(MISSION_REQUEST_DATA::ID),
36612            MISSION_REQUEST_INT_DATA::NAME => Some(MISSION_REQUEST_INT_DATA::ID),
36613            MISSION_REQUEST_LIST_DATA::NAME => Some(MISSION_REQUEST_LIST_DATA::ID),
36614            MISSION_REQUEST_PARTIAL_LIST_DATA::NAME => Some(MISSION_REQUEST_PARTIAL_LIST_DATA::ID),
36615            MISSION_SET_CURRENT_DATA::NAME => Some(MISSION_SET_CURRENT_DATA::ID),
36616            MISSION_WRITE_PARTIAL_LIST_DATA::NAME => Some(MISSION_WRITE_PARTIAL_LIST_DATA::ID),
36617            MOUNT_ORIENTATION_DATA::NAME => Some(MOUNT_ORIENTATION_DATA::ID),
36618            NAMED_VALUE_FLOAT_DATA::NAME => Some(NAMED_VALUE_FLOAT_DATA::ID),
36619            NAMED_VALUE_INT_DATA::NAME => Some(NAMED_VALUE_INT_DATA::ID),
36620            NAV_CONTROLLER_OUTPUT_DATA::NAME => Some(NAV_CONTROLLER_OUTPUT_DATA::ID),
36621            OBSTACLE_DISTANCE_DATA::NAME => Some(OBSTACLE_DISTANCE_DATA::ID),
36622            ODOMETRY_DATA::NAME => Some(ODOMETRY_DATA::ID),
36623            ONBOARD_COMPUTER_STATUS_DATA::NAME => Some(ONBOARD_COMPUTER_STATUS_DATA::ID),
36624            OPEN_DRONE_ID_ARM_STATUS_DATA::NAME => Some(OPEN_DRONE_ID_ARM_STATUS_DATA::ID),
36625            OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME => Some(OPEN_DRONE_ID_AUTHENTICATION_DATA::ID),
36626            OPEN_DRONE_ID_BASIC_ID_DATA::NAME => Some(OPEN_DRONE_ID_BASIC_ID_DATA::ID),
36627            OPEN_DRONE_ID_LOCATION_DATA::NAME => Some(OPEN_DRONE_ID_LOCATION_DATA::ID),
36628            OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME => Some(OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID),
36629            OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME => Some(OPEN_DRONE_ID_OPERATOR_ID_DATA::ID),
36630            OPEN_DRONE_ID_SELF_ID_DATA::NAME => Some(OPEN_DRONE_ID_SELF_ID_DATA::ID),
36631            OPEN_DRONE_ID_SYSTEM_DATA::NAME => Some(OPEN_DRONE_ID_SYSTEM_DATA::ID),
36632            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME => Some(OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID),
36633            OPTICAL_FLOW_DATA::NAME => Some(OPTICAL_FLOW_DATA::ID),
36634            OPTICAL_FLOW_RAD_DATA::NAME => Some(OPTICAL_FLOW_RAD_DATA::ID),
36635            ORBIT_EXECUTION_STATUS_DATA::NAME => Some(ORBIT_EXECUTION_STATUS_DATA::ID),
36636            PARAM_EXT_ACK_DATA::NAME => Some(PARAM_EXT_ACK_DATA::ID),
36637            PARAM_EXT_REQUEST_LIST_DATA::NAME => Some(PARAM_EXT_REQUEST_LIST_DATA::ID),
36638            PARAM_EXT_REQUEST_READ_DATA::NAME => Some(PARAM_EXT_REQUEST_READ_DATA::ID),
36639            PARAM_EXT_SET_DATA::NAME => Some(PARAM_EXT_SET_DATA::ID),
36640            PARAM_EXT_VALUE_DATA::NAME => Some(PARAM_EXT_VALUE_DATA::ID),
36641            PARAM_MAP_RC_DATA::NAME => Some(PARAM_MAP_RC_DATA::ID),
36642            PARAM_REQUEST_LIST_DATA::NAME => Some(PARAM_REQUEST_LIST_DATA::ID),
36643            PARAM_REQUEST_READ_DATA::NAME => Some(PARAM_REQUEST_READ_DATA::ID),
36644            PARAM_SET_DATA::NAME => Some(PARAM_SET_DATA::ID),
36645            PARAM_VALUE_DATA::NAME => Some(PARAM_VALUE_DATA::ID),
36646            PING_DATA::NAME => Some(PING_DATA::ID),
36647            PLAY_TUNE_DATA::NAME => Some(PLAY_TUNE_DATA::ID),
36648            PLAY_TUNE_V2_DATA::NAME => Some(PLAY_TUNE_V2_DATA::ID),
36649            POSITION_TARGET_GLOBAL_INT_DATA::NAME => Some(POSITION_TARGET_GLOBAL_INT_DATA::ID),
36650            POSITION_TARGET_LOCAL_NED_DATA::NAME => Some(POSITION_TARGET_LOCAL_NED_DATA::ID),
36651            POWER_STATUS_DATA::NAME => Some(POWER_STATUS_DATA::ID),
36652            PROTOCOL_VERSION_DATA::NAME => Some(PROTOCOL_VERSION_DATA::ID),
36653            RADIO_STATUS_DATA::NAME => Some(RADIO_STATUS_DATA::ID),
36654            RAW_IMU_DATA::NAME => Some(RAW_IMU_DATA::ID),
36655            RAW_PRESSURE_DATA::NAME => Some(RAW_PRESSURE_DATA::ID),
36656            RAW_RPM_DATA::NAME => Some(RAW_RPM_DATA::ID),
36657            RC_CHANNELS_DATA::NAME => Some(RC_CHANNELS_DATA::ID),
36658            RC_CHANNELS_OVERRIDE_DATA::NAME => Some(RC_CHANNELS_OVERRIDE_DATA::ID),
36659            RC_CHANNELS_RAW_DATA::NAME => Some(RC_CHANNELS_RAW_DATA::ID),
36660            RC_CHANNELS_SCALED_DATA::NAME => Some(RC_CHANNELS_SCALED_DATA::ID),
36661            REQUEST_DATA_STREAM_DATA::NAME => Some(REQUEST_DATA_STREAM_DATA::ID),
36662            REQUEST_EVENT_DATA::NAME => Some(REQUEST_EVENT_DATA::ID),
36663            RESOURCE_REQUEST_DATA::NAME => Some(RESOURCE_REQUEST_DATA::ID),
36664            RESPONSE_EVENT_ERROR_DATA::NAME => Some(RESPONSE_EVENT_ERROR_DATA::ID),
36665            SAFETY_ALLOWED_AREA_DATA::NAME => Some(SAFETY_ALLOWED_AREA_DATA::ID),
36666            SAFETY_SET_ALLOWED_AREA_DATA::NAME => Some(SAFETY_SET_ALLOWED_AREA_DATA::ID),
36667            SATCOM_LINK_STATUS_DATA::NAME => Some(SATCOM_LINK_STATUS_DATA::ID),
36668            SCALED_IMU_DATA::NAME => Some(SCALED_IMU_DATA::ID),
36669            SCALED_IMU2_DATA::NAME => Some(SCALED_IMU2_DATA::ID),
36670            SCALED_IMU3_DATA::NAME => Some(SCALED_IMU3_DATA::ID),
36671            SCALED_PRESSURE_DATA::NAME => Some(SCALED_PRESSURE_DATA::ID),
36672            SCALED_PRESSURE2_DATA::NAME => Some(SCALED_PRESSURE2_DATA::ID),
36673            SCALED_PRESSURE3_DATA::NAME => Some(SCALED_PRESSURE3_DATA::ID),
36674            SENSORPOD_STATUS_DATA::NAME => Some(SENSORPOD_STATUS_DATA::ID),
36675            SENSOR_AIRFLOW_ANGLES_DATA::NAME => Some(SENSOR_AIRFLOW_ANGLES_DATA::ID),
36676            SENS_ATMOS_DATA::NAME => Some(SENS_ATMOS_DATA::ID),
36677            SENS_BATMON_DATA::NAME => Some(SENS_BATMON_DATA::ID),
36678            SENS_MPPT_DATA::NAME => Some(SENS_MPPT_DATA::ID),
36679            SENS_POWER_DATA::NAME => Some(SENS_POWER_DATA::ID),
36680            SENS_POWER_BOARD_DATA::NAME => Some(SENS_POWER_BOARD_DATA::ID),
36681            SERIAL_CONTROL_DATA::NAME => Some(SERIAL_CONTROL_DATA::ID),
36682            SERVO_OUTPUT_RAW_DATA::NAME => Some(SERVO_OUTPUT_RAW_DATA::ID),
36683            SETUP_SIGNING_DATA::NAME => Some(SETUP_SIGNING_DATA::ID),
36684            SET_ACTUATOR_CONTROL_TARGET_DATA::NAME => Some(SET_ACTUATOR_CONTROL_TARGET_DATA::ID),
36685            SET_ATTITUDE_TARGET_DATA::NAME => Some(SET_ATTITUDE_TARGET_DATA::ID),
36686            SET_GPS_GLOBAL_ORIGIN_DATA::NAME => Some(SET_GPS_GLOBAL_ORIGIN_DATA::ID),
36687            SET_HOME_POSITION_DATA::NAME => Some(SET_HOME_POSITION_DATA::ID),
36688            SET_MODE_DATA::NAME => Some(SET_MODE_DATA::ID),
36689            SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME => {
36690                Some(SET_POSITION_TARGET_GLOBAL_INT_DATA::ID)
36691            }
36692            SET_POSITION_TARGET_LOCAL_NED_DATA::NAME => {
36693                Some(SET_POSITION_TARGET_LOCAL_NED_DATA::ID)
36694            }
36695            SIM_STATE_DATA::NAME => Some(SIM_STATE_DATA::ID),
36696            SMART_BATTERY_INFO_DATA::NAME => Some(SMART_BATTERY_INFO_DATA::ID),
36697            STATUSTEXT_DATA::NAME => Some(STATUSTEXT_DATA::ID),
36698            STORAGE_INFORMATION_DATA::NAME => Some(STORAGE_INFORMATION_DATA::ID),
36699            SUPPORTED_TUNES_DATA::NAME => Some(SUPPORTED_TUNES_DATA::ID),
36700            SYSTEM_TIME_DATA::NAME => Some(SYSTEM_TIME_DATA::ID),
36701            SYS_STATUS_DATA::NAME => Some(SYS_STATUS_DATA::ID),
36702            TERRAIN_CHECK_DATA::NAME => Some(TERRAIN_CHECK_DATA::ID),
36703            TERRAIN_DATA_DATA::NAME => Some(TERRAIN_DATA_DATA::ID),
36704            TERRAIN_REPORT_DATA::NAME => Some(TERRAIN_REPORT_DATA::ID),
36705            TERRAIN_REQUEST_DATA::NAME => Some(TERRAIN_REQUEST_DATA::ID),
36706            TIMESYNC_DATA::NAME => Some(TIMESYNC_DATA::ID),
36707            TIME_ESTIMATE_TO_TARGET_DATA::NAME => Some(TIME_ESTIMATE_TO_TARGET_DATA::ID),
36708            TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME => {
36709                Some(TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID)
36710            }
36711            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME => {
36712                Some(TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID)
36713            }
36714            TUNNEL_DATA::NAME => Some(TUNNEL_DATA::ID),
36715            UAVCAN_NODE_INFO_DATA::NAME => Some(UAVCAN_NODE_INFO_DATA::ID),
36716            UAVCAN_NODE_STATUS_DATA::NAME => Some(UAVCAN_NODE_STATUS_DATA::ID),
36717            UTM_GLOBAL_POSITION_DATA::NAME => Some(UTM_GLOBAL_POSITION_DATA::ID),
36718            V2_EXTENSION_DATA::NAME => Some(V2_EXTENSION_DATA::ID),
36719            VFR_HUD_DATA::NAME => Some(VFR_HUD_DATA::ID),
36720            VIBRATION_DATA::NAME => Some(VIBRATION_DATA::ID),
36721            VICON_POSITION_ESTIMATE_DATA::NAME => Some(VICON_POSITION_ESTIMATE_DATA::ID),
36722            VIDEO_STREAM_INFORMATION_DATA::NAME => Some(VIDEO_STREAM_INFORMATION_DATA::ID),
36723            VIDEO_STREAM_STATUS_DATA::NAME => Some(VIDEO_STREAM_STATUS_DATA::ID),
36724            VISION_POSITION_ESTIMATE_DATA::NAME => Some(VISION_POSITION_ESTIMATE_DATA::ID),
36725            VISION_SPEED_ESTIMATE_DATA::NAME => Some(VISION_SPEED_ESTIMATE_DATA::ID),
36726            WHEEL_DISTANCE_DATA::NAME => Some(WHEEL_DISTANCE_DATA::ID),
36727            WIFI_CONFIG_AP_DATA::NAME => Some(WIFI_CONFIG_AP_DATA::ID),
36728            WINCH_STATUS_DATA::NAME => Some(WINCH_STATUS_DATA::ID),
36729            WIND_COV_DATA::NAME => Some(WIND_COV_DATA::ID),
36730            _ => None,
36731        }
36732    }
36733    fn default_message_from_id(id: u32) -> Option<Self> {
36734        match id {
36735            ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::ACTUATOR_CONTROL_TARGET(
36736                ACTUATOR_CONTROL_TARGET_DATA::default(),
36737            )),
36738            ACTUATOR_OUTPUT_STATUS_DATA::ID => Some(Self::ACTUATOR_OUTPUT_STATUS(
36739                ACTUATOR_OUTPUT_STATUS_DATA::default(),
36740            )),
36741            ADSB_VEHICLE_DATA::ID => Some(Self::ADSB_VEHICLE(ADSB_VEHICLE_DATA::default())),
36742            AIS_VESSEL_DATA::ID => Some(Self::AIS_VESSEL(AIS_VESSEL_DATA::default())),
36743            ALTITUDE_DATA::ID => Some(Self::ALTITUDE(ALTITUDE_DATA::default())),
36744            ASLCTRL_DATA_DATA::ID => Some(Self::ASLCTRL_DATA(ASLCTRL_DATA_DATA::default())),
36745            ASLCTRL_DEBUG_DATA::ID => Some(Self::ASLCTRL_DEBUG(ASLCTRL_DEBUG_DATA::default())),
36746            ASLUAV_STATUS_DATA::ID => Some(Self::ASLUAV_STATUS(ASLUAV_STATUS_DATA::default())),
36747            ASL_OBCTRL_DATA::ID => Some(Self::ASL_OBCTRL(ASL_OBCTRL_DATA::default())),
36748            ATTITUDE_DATA::ID => Some(Self::ATTITUDE(ATTITUDE_DATA::default())),
36749            ATTITUDE_QUATERNION_DATA::ID => Some(Self::ATTITUDE_QUATERNION(
36750                ATTITUDE_QUATERNION_DATA::default(),
36751            )),
36752            ATTITUDE_QUATERNION_COV_DATA::ID => Some(Self::ATTITUDE_QUATERNION_COV(
36753                ATTITUDE_QUATERNION_COV_DATA::default(),
36754            )),
36755            ATTITUDE_TARGET_DATA::ID => {
36756                Some(Self::ATTITUDE_TARGET(ATTITUDE_TARGET_DATA::default()))
36757            }
36758            ATT_POS_MOCAP_DATA::ID => Some(Self::ATT_POS_MOCAP(ATT_POS_MOCAP_DATA::default())),
36759            AUTH_KEY_DATA::ID => Some(Self::AUTH_KEY(AUTH_KEY_DATA::default())),
36760            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
36761                Some(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(
36762                    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::default(),
36763                ))
36764            }
36765            AUTOPILOT_VERSION_DATA::ID => {
36766                Some(Self::AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA::default()))
36767            }
36768            AVAILABLE_MODES_DATA::ID => {
36769                Some(Self::AVAILABLE_MODES(AVAILABLE_MODES_DATA::default()))
36770            }
36771            AVAILABLE_MODES_MONITOR_DATA::ID => Some(Self::AVAILABLE_MODES_MONITOR(
36772                AVAILABLE_MODES_MONITOR_DATA::default(),
36773            )),
36774            BATTERY_INFO_DATA::ID => Some(Self::BATTERY_INFO(BATTERY_INFO_DATA::default())),
36775            BATTERY_STATUS_DATA::ID => Some(Self::BATTERY_STATUS(BATTERY_STATUS_DATA::default())),
36776            BUTTON_CHANGE_DATA::ID => Some(Self::BUTTON_CHANGE(BUTTON_CHANGE_DATA::default())),
36777            CAMERA_CAPTURE_STATUS_DATA::ID => Some(Self::CAMERA_CAPTURE_STATUS(
36778                CAMERA_CAPTURE_STATUS_DATA::default(),
36779            )),
36780            CAMERA_FOV_STATUS_DATA::ID => {
36781                Some(Self::CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA::default()))
36782            }
36783            CAMERA_IMAGE_CAPTURED_DATA::ID => Some(Self::CAMERA_IMAGE_CAPTURED(
36784                CAMERA_IMAGE_CAPTURED_DATA::default(),
36785            )),
36786            CAMERA_INFORMATION_DATA::ID => {
36787                Some(Self::CAMERA_INFORMATION(CAMERA_INFORMATION_DATA::default()))
36788            }
36789            CAMERA_SETTINGS_DATA::ID => {
36790                Some(Self::CAMERA_SETTINGS(CAMERA_SETTINGS_DATA::default()))
36791            }
36792            CAMERA_THERMAL_RANGE_DATA::ID => Some(Self::CAMERA_THERMAL_RANGE(
36793                CAMERA_THERMAL_RANGE_DATA::default(),
36794            )),
36795            CAMERA_TRACKING_GEO_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_GEO_STATUS(
36796                CAMERA_TRACKING_GEO_STATUS_DATA::default(),
36797            )),
36798            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_IMAGE_STATUS(
36799                CAMERA_TRACKING_IMAGE_STATUS_DATA::default(),
36800            )),
36801            CAMERA_TRIGGER_DATA::ID => Some(Self::CAMERA_TRIGGER(CAMERA_TRIGGER_DATA::default())),
36802            CANFD_FRAME_DATA::ID => Some(Self::CANFD_FRAME(CANFD_FRAME_DATA::default())),
36803            CAN_FILTER_MODIFY_DATA::ID => {
36804                Some(Self::CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA::default()))
36805            }
36806            CAN_FRAME_DATA::ID => Some(Self::CAN_FRAME(CAN_FRAME_DATA::default())),
36807            CELLULAR_CONFIG_DATA::ID => {
36808                Some(Self::CELLULAR_CONFIG(CELLULAR_CONFIG_DATA::default()))
36809            }
36810            CELLULAR_STATUS_DATA::ID => {
36811                Some(Self::CELLULAR_STATUS(CELLULAR_STATUS_DATA::default()))
36812            }
36813            CHANGE_OPERATOR_CONTROL_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL(
36814                CHANGE_OPERATOR_CONTROL_DATA::default(),
36815            )),
36816            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL_ACK(
36817                CHANGE_OPERATOR_CONTROL_ACK_DATA::default(),
36818            )),
36819            COLLISION_DATA::ID => Some(Self::COLLISION(COLLISION_DATA::default())),
36820            COMMAND_ACK_DATA::ID => Some(Self::COMMAND_ACK(COMMAND_ACK_DATA::default())),
36821            COMMAND_CANCEL_DATA::ID => Some(Self::COMMAND_CANCEL(COMMAND_CANCEL_DATA::default())),
36822            COMMAND_INT_DATA::ID => Some(Self::COMMAND_INT(COMMAND_INT_DATA::default())),
36823            COMMAND_INT_STAMPED_DATA::ID => Some(Self::COMMAND_INT_STAMPED(
36824                COMMAND_INT_STAMPED_DATA::default(),
36825            )),
36826            COMMAND_LONG_DATA::ID => Some(Self::COMMAND_LONG(COMMAND_LONG_DATA::default())),
36827            COMMAND_LONG_STAMPED_DATA::ID => Some(Self::COMMAND_LONG_STAMPED(
36828                COMMAND_LONG_STAMPED_DATA::default(),
36829            )),
36830            COMPONENT_INFORMATION_DATA::ID => Some(Self::COMPONENT_INFORMATION(
36831                COMPONENT_INFORMATION_DATA::default(),
36832            )),
36833            COMPONENT_INFORMATION_BASIC_DATA::ID => Some(Self::COMPONENT_INFORMATION_BASIC(
36834                COMPONENT_INFORMATION_BASIC_DATA::default(),
36835            )),
36836            COMPONENT_METADATA_DATA::ID => {
36837                Some(Self::COMPONENT_METADATA(COMPONENT_METADATA_DATA::default()))
36838            }
36839            CONTROL_SYSTEM_STATE_DATA::ID => Some(Self::CONTROL_SYSTEM_STATE(
36840                CONTROL_SYSTEM_STATE_DATA::default(),
36841            )),
36842            CURRENT_EVENT_SEQUENCE_DATA::ID => Some(Self::CURRENT_EVENT_SEQUENCE(
36843                CURRENT_EVENT_SEQUENCE_DATA::default(),
36844            )),
36845            CURRENT_MODE_DATA::ID => Some(Self::CURRENT_MODE(CURRENT_MODE_DATA::default())),
36846            DATA_STREAM_DATA::ID => Some(Self::DATA_STREAM(DATA_STREAM_DATA::default())),
36847            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => Some(Self::DATA_TRANSMISSION_HANDSHAKE(
36848                DATA_TRANSMISSION_HANDSHAKE_DATA::default(),
36849            )),
36850            DEBUG_DATA::ID => Some(Self::DEBUG(DEBUG_DATA::default())),
36851            DEBUG_FLOAT_ARRAY_DATA::ID => {
36852                Some(Self::DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA::default()))
36853            }
36854            DEBUG_VECT_DATA::ID => Some(Self::DEBUG_VECT(DEBUG_VECT_DATA::default())),
36855            DISTANCE_SENSOR_DATA::ID => {
36856                Some(Self::DISTANCE_SENSOR(DISTANCE_SENSOR_DATA::default()))
36857            }
36858            EFI_STATUS_DATA::ID => Some(Self::EFI_STATUS(EFI_STATUS_DATA::default())),
36859            EKF_EXT_DATA::ID => Some(Self::EKF_EXT(EKF_EXT_DATA::default())),
36860            ENCAPSULATED_DATA_DATA::ID => {
36861                Some(Self::ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA::default()))
36862            }
36863            ESC_INFO_DATA::ID => Some(Self::ESC_INFO(ESC_INFO_DATA::default())),
36864            ESC_STATUS_DATA::ID => Some(Self::ESC_STATUS(ESC_STATUS_DATA::default())),
36865            ESTIMATOR_STATUS_DATA::ID => {
36866                Some(Self::ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA::default()))
36867            }
36868            EVENT_DATA::ID => Some(Self::EVENT(EVENT_DATA::default())),
36869            EXTENDED_SYS_STATE_DATA::ID => {
36870                Some(Self::EXTENDED_SYS_STATE(EXTENDED_SYS_STATE_DATA::default()))
36871            }
36872            FENCE_STATUS_DATA::ID => Some(Self::FENCE_STATUS(FENCE_STATUS_DATA::default())),
36873            FILE_TRANSFER_PROTOCOL_DATA::ID => Some(Self::FILE_TRANSFER_PROTOCOL(
36874                FILE_TRANSFER_PROTOCOL_DATA::default(),
36875            )),
36876            FLIGHT_INFORMATION_DATA::ID => {
36877                Some(Self::FLIGHT_INFORMATION(FLIGHT_INFORMATION_DATA::default()))
36878            }
36879            FOLLOW_TARGET_DATA::ID => Some(Self::FOLLOW_TARGET(FOLLOW_TARGET_DATA::default())),
36880            FUEL_STATUS_DATA::ID => Some(Self::FUEL_STATUS(FUEL_STATUS_DATA::default())),
36881            FW_SOARING_DATA_DATA::ID => {
36882                Some(Self::FW_SOARING_DATA(FW_SOARING_DATA_DATA::default()))
36883            }
36884            GENERATOR_STATUS_DATA::ID => {
36885                Some(Self::GENERATOR_STATUS(GENERATOR_STATUS_DATA::default()))
36886            }
36887            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => Some(Self::GIMBAL_DEVICE_ATTITUDE_STATUS(
36888                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::default(),
36889            )),
36890            GIMBAL_DEVICE_INFORMATION_DATA::ID => Some(Self::GIMBAL_DEVICE_INFORMATION(
36891                GIMBAL_DEVICE_INFORMATION_DATA::default(),
36892            )),
36893            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_DEVICE_SET_ATTITUDE(
36894                GIMBAL_DEVICE_SET_ATTITUDE_DATA::default(),
36895            )),
36896            GIMBAL_MANAGER_INFORMATION_DATA::ID => Some(Self::GIMBAL_MANAGER_INFORMATION(
36897                GIMBAL_MANAGER_INFORMATION_DATA::default(),
36898            )),
36899            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_ATTITUDE(
36900                GIMBAL_MANAGER_SET_ATTITUDE_DATA::default(),
36901            )),
36902            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
36903                Some(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(
36904                    GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::default(),
36905                ))
36906            }
36907            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_PITCHYAW(
36908                GIMBAL_MANAGER_SET_PITCHYAW_DATA::default(),
36909            )),
36910            GIMBAL_MANAGER_STATUS_DATA::ID => Some(Self::GIMBAL_MANAGER_STATUS(
36911                GIMBAL_MANAGER_STATUS_DATA::default(),
36912            )),
36913            GLOBAL_POSITION_INT_DATA::ID => Some(Self::GLOBAL_POSITION_INT(
36914                GLOBAL_POSITION_INT_DATA::default(),
36915            )),
36916            GLOBAL_POSITION_INT_COV_DATA::ID => Some(Self::GLOBAL_POSITION_INT_COV(
36917                GLOBAL_POSITION_INT_COV_DATA::default(),
36918            )),
36919            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
36920                Some(Self::GLOBAL_VISION_POSITION_ESTIMATE(
36921                    GLOBAL_VISION_POSITION_ESTIMATE_DATA::default(),
36922                ))
36923            }
36924            GPS2_RAW_DATA::ID => Some(Self::GPS2_RAW(GPS2_RAW_DATA::default())),
36925            GPS2_RTK_DATA::ID => Some(Self::GPS2_RTK(GPS2_RTK_DATA::default())),
36926            GPS_GLOBAL_ORIGIN_DATA::ID => {
36927                Some(Self::GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA::default()))
36928            }
36929            GPS_INJECT_DATA_DATA::ID => {
36930                Some(Self::GPS_INJECT_DATA(GPS_INJECT_DATA_DATA::default()))
36931            }
36932            GPS_INPUT_DATA::ID => Some(Self::GPS_INPUT(GPS_INPUT_DATA::default())),
36933            GPS_RAW_INT_DATA::ID => Some(Self::GPS_RAW_INT(GPS_RAW_INT_DATA::default())),
36934            GPS_RTCM_DATA_DATA::ID => Some(Self::GPS_RTCM_DATA(GPS_RTCM_DATA_DATA::default())),
36935            GPS_RTK_DATA::ID => Some(Self::GPS_RTK(GPS_RTK_DATA::default())),
36936            GPS_STATUS_DATA::ID => Some(Self::GPS_STATUS(GPS_STATUS_DATA::default())),
36937            GSM_LINK_STATUS_DATA::ID => {
36938                Some(Self::GSM_LINK_STATUS(GSM_LINK_STATUS_DATA::default()))
36939            }
36940            HEARTBEAT_DATA::ID => Some(Self::HEARTBEAT(HEARTBEAT_DATA::default())),
36941            HIGHRES_IMU_DATA::ID => Some(Self::HIGHRES_IMU(HIGHRES_IMU_DATA::default())),
36942            HIGH_LATENCY_DATA::ID => Some(Self::HIGH_LATENCY(HIGH_LATENCY_DATA::default())),
36943            HIGH_LATENCY2_DATA::ID => Some(Self::HIGH_LATENCY2(HIGH_LATENCY2_DATA::default())),
36944            HIL_ACTUATOR_CONTROLS_DATA::ID => Some(Self::HIL_ACTUATOR_CONTROLS(
36945                HIL_ACTUATOR_CONTROLS_DATA::default(),
36946            )),
36947            HIL_CONTROLS_DATA::ID => Some(Self::HIL_CONTROLS(HIL_CONTROLS_DATA::default())),
36948            HIL_GPS_DATA::ID => Some(Self::HIL_GPS(HIL_GPS_DATA::default())),
36949            HIL_OPTICAL_FLOW_DATA::ID => {
36950                Some(Self::HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA::default()))
36951            }
36952            HIL_RC_INPUTS_RAW_DATA::ID => {
36953                Some(Self::HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA::default()))
36954            }
36955            HIL_SENSOR_DATA::ID => Some(Self::HIL_SENSOR(HIL_SENSOR_DATA::default())),
36956            HIL_STATE_DATA::ID => Some(Self::HIL_STATE(HIL_STATE_DATA::default())),
36957            HIL_STATE_QUATERNION_DATA::ID => Some(Self::HIL_STATE_QUATERNION(
36958                HIL_STATE_QUATERNION_DATA::default(),
36959            )),
36960            HOME_POSITION_DATA::ID => Some(Self::HOME_POSITION(HOME_POSITION_DATA::default())),
36961            HYGROMETER_SENSOR_DATA::ID => {
36962                Some(Self::HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA::default()))
36963            }
36964            ILLUMINATOR_STATUS_DATA::ID => {
36965                Some(Self::ILLUMINATOR_STATUS(ILLUMINATOR_STATUS_DATA::default()))
36966            }
36967            ISBD_LINK_STATUS_DATA::ID => {
36968                Some(Self::ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA::default()))
36969            }
36970            LANDING_TARGET_DATA::ID => Some(Self::LANDING_TARGET(LANDING_TARGET_DATA::default())),
36971            LINK_NODE_STATUS_DATA::ID => {
36972                Some(Self::LINK_NODE_STATUS(LINK_NODE_STATUS_DATA::default()))
36973            }
36974            LOCAL_POSITION_NED_DATA::ID => {
36975                Some(Self::LOCAL_POSITION_NED(LOCAL_POSITION_NED_DATA::default()))
36976            }
36977            LOCAL_POSITION_NED_COV_DATA::ID => Some(Self::LOCAL_POSITION_NED_COV(
36978                LOCAL_POSITION_NED_COV_DATA::default(),
36979            )),
36980            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
36981                Some(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(
36982                    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::default(),
36983                ))
36984            }
36985            LOGGING_ACK_DATA::ID => Some(Self::LOGGING_ACK(LOGGING_ACK_DATA::default())),
36986            LOGGING_DATA_DATA::ID => Some(Self::LOGGING_DATA(LOGGING_DATA_DATA::default())),
36987            LOGGING_DATA_ACKED_DATA::ID => {
36988                Some(Self::LOGGING_DATA_ACKED(LOGGING_DATA_ACKED_DATA::default()))
36989            }
36990            LOG_DATA_DATA::ID => Some(Self::LOG_DATA(LOG_DATA_DATA::default())),
36991            LOG_ENTRY_DATA::ID => Some(Self::LOG_ENTRY(LOG_ENTRY_DATA::default())),
36992            LOG_ERASE_DATA::ID => Some(Self::LOG_ERASE(LOG_ERASE_DATA::default())),
36993            LOG_REQUEST_DATA_DATA::ID => {
36994                Some(Self::LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA::default()))
36995            }
36996            LOG_REQUEST_END_DATA::ID => {
36997                Some(Self::LOG_REQUEST_END(LOG_REQUEST_END_DATA::default()))
36998            }
36999            LOG_REQUEST_LIST_DATA::ID => {
37000                Some(Self::LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA::default()))
37001            }
37002            MAG_CAL_REPORT_DATA::ID => Some(Self::MAG_CAL_REPORT(MAG_CAL_REPORT_DATA::default())),
37003            MANUAL_CONTROL_DATA::ID => Some(Self::MANUAL_CONTROL(MANUAL_CONTROL_DATA::default())),
37004            MANUAL_SETPOINT_DATA::ID => {
37005                Some(Self::MANUAL_SETPOINT(MANUAL_SETPOINT_DATA::default()))
37006            }
37007            MEMORY_VECT_DATA::ID => Some(Self::MEMORY_VECT(MEMORY_VECT_DATA::default())),
37008            MESSAGE_INTERVAL_DATA::ID => {
37009                Some(Self::MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA::default()))
37010            }
37011            MISSION_ACK_DATA::ID => Some(Self::MISSION_ACK(MISSION_ACK_DATA::default())),
37012            MISSION_CLEAR_ALL_DATA::ID => {
37013                Some(Self::MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA::default()))
37014            }
37015            MISSION_COUNT_DATA::ID => Some(Self::MISSION_COUNT(MISSION_COUNT_DATA::default())),
37016            MISSION_CURRENT_DATA::ID => {
37017                Some(Self::MISSION_CURRENT(MISSION_CURRENT_DATA::default()))
37018            }
37019            MISSION_ITEM_DATA::ID => Some(Self::MISSION_ITEM(MISSION_ITEM_DATA::default())),
37020            MISSION_ITEM_INT_DATA::ID => {
37021                Some(Self::MISSION_ITEM_INT(MISSION_ITEM_INT_DATA::default()))
37022            }
37023            MISSION_ITEM_REACHED_DATA::ID => Some(Self::MISSION_ITEM_REACHED(
37024                MISSION_ITEM_REACHED_DATA::default(),
37025            )),
37026            MISSION_REQUEST_DATA::ID => {
37027                Some(Self::MISSION_REQUEST(MISSION_REQUEST_DATA::default()))
37028            }
37029            MISSION_REQUEST_INT_DATA::ID => Some(Self::MISSION_REQUEST_INT(
37030                MISSION_REQUEST_INT_DATA::default(),
37031            )),
37032            MISSION_REQUEST_LIST_DATA::ID => Some(Self::MISSION_REQUEST_LIST(
37033                MISSION_REQUEST_LIST_DATA::default(),
37034            )),
37035            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_REQUEST_PARTIAL_LIST(
37036                MISSION_REQUEST_PARTIAL_LIST_DATA::default(),
37037            )),
37038            MISSION_SET_CURRENT_DATA::ID => Some(Self::MISSION_SET_CURRENT(
37039                MISSION_SET_CURRENT_DATA::default(),
37040            )),
37041            MISSION_WRITE_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_WRITE_PARTIAL_LIST(
37042                MISSION_WRITE_PARTIAL_LIST_DATA::default(),
37043            )),
37044            MOUNT_ORIENTATION_DATA::ID => {
37045                Some(Self::MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA::default()))
37046            }
37047            NAMED_VALUE_FLOAT_DATA::ID => {
37048                Some(Self::NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA::default()))
37049            }
37050            NAMED_VALUE_INT_DATA::ID => {
37051                Some(Self::NAMED_VALUE_INT(NAMED_VALUE_INT_DATA::default()))
37052            }
37053            NAV_CONTROLLER_OUTPUT_DATA::ID => Some(Self::NAV_CONTROLLER_OUTPUT(
37054                NAV_CONTROLLER_OUTPUT_DATA::default(),
37055            )),
37056            OBSTACLE_DISTANCE_DATA::ID => {
37057                Some(Self::OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA::default()))
37058            }
37059            ODOMETRY_DATA::ID => Some(Self::ODOMETRY(ODOMETRY_DATA::default())),
37060            ONBOARD_COMPUTER_STATUS_DATA::ID => Some(Self::ONBOARD_COMPUTER_STATUS(
37061                ONBOARD_COMPUTER_STATUS_DATA::default(),
37062            )),
37063            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => Some(Self::OPEN_DRONE_ID_ARM_STATUS(
37064                OPEN_DRONE_ID_ARM_STATUS_DATA::default(),
37065            )),
37066            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => Some(Self::OPEN_DRONE_ID_AUTHENTICATION(
37067                OPEN_DRONE_ID_AUTHENTICATION_DATA::default(),
37068            )),
37069            OPEN_DRONE_ID_BASIC_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_BASIC_ID(
37070                OPEN_DRONE_ID_BASIC_ID_DATA::default(),
37071            )),
37072            OPEN_DRONE_ID_LOCATION_DATA::ID => Some(Self::OPEN_DRONE_ID_LOCATION(
37073                OPEN_DRONE_ID_LOCATION_DATA::default(),
37074            )),
37075            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => Some(Self::OPEN_DRONE_ID_MESSAGE_PACK(
37076                OPEN_DRONE_ID_MESSAGE_PACK_DATA::default(),
37077            )),
37078            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_OPERATOR_ID(
37079                OPEN_DRONE_ID_OPERATOR_ID_DATA::default(),
37080            )),
37081            OPEN_DRONE_ID_SELF_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_SELF_ID(
37082                OPEN_DRONE_ID_SELF_ID_DATA::default(),
37083            )),
37084            OPEN_DRONE_ID_SYSTEM_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM(
37085                OPEN_DRONE_ID_SYSTEM_DATA::default(),
37086            )),
37087            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM_UPDATE(
37088                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::default(),
37089            )),
37090            OPTICAL_FLOW_DATA::ID => Some(Self::OPTICAL_FLOW(OPTICAL_FLOW_DATA::default())),
37091            OPTICAL_FLOW_RAD_DATA::ID => {
37092                Some(Self::OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA::default()))
37093            }
37094            ORBIT_EXECUTION_STATUS_DATA::ID => Some(Self::ORBIT_EXECUTION_STATUS(
37095                ORBIT_EXECUTION_STATUS_DATA::default(),
37096            )),
37097            PARAM_EXT_ACK_DATA::ID => Some(Self::PARAM_EXT_ACK(PARAM_EXT_ACK_DATA::default())),
37098            PARAM_EXT_REQUEST_LIST_DATA::ID => Some(Self::PARAM_EXT_REQUEST_LIST(
37099                PARAM_EXT_REQUEST_LIST_DATA::default(),
37100            )),
37101            PARAM_EXT_REQUEST_READ_DATA::ID => Some(Self::PARAM_EXT_REQUEST_READ(
37102                PARAM_EXT_REQUEST_READ_DATA::default(),
37103            )),
37104            PARAM_EXT_SET_DATA::ID => Some(Self::PARAM_EXT_SET(PARAM_EXT_SET_DATA::default())),
37105            PARAM_EXT_VALUE_DATA::ID => {
37106                Some(Self::PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA::default()))
37107            }
37108            PARAM_MAP_RC_DATA::ID => Some(Self::PARAM_MAP_RC(PARAM_MAP_RC_DATA::default())),
37109            PARAM_REQUEST_LIST_DATA::ID => {
37110                Some(Self::PARAM_REQUEST_LIST(PARAM_REQUEST_LIST_DATA::default()))
37111            }
37112            PARAM_REQUEST_READ_DATA::ID => {
37113                Some(Self::PARAM_REQUEST_READ(PARAM_REQUEST_READ_DATA::default()))
37114            }
37115            PARAM_SET_DATA::ID => Some(Self::PARAM_SET(PARAM_SET_DATA::default())),
37116            PARAM_VALUE_DATA::ID => Some(Self::PARAM_VALUE(PARAM_VALUE_DATA::default())),
37117            PING_DATA::ID => Some(Self::PING(PING_DATA::default())),
37118            PLAY_TUNE_DATA::ID => Some(Self::PLAY_TUNE(PLAY_TUNE_DATA::default())),
37119            PLAY_TUNE_V2_DATA::ID => Some(Self::PLAY_TUNE_V2(PLAY_TUNE_V2_DATA::default())),
37120            POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::POSITION_TARGET_GLOBAL_INT(
37121                POSITION_TARGET_GLOBAL_INT_DATA::default(),
37122            )),
37123            POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::POSITION_TARGET_LOCAL_NED(
37124                POSITION_TARGET_LOCAL_NED_DATA::default(),
37125            )),
37126            POWER_STATUS_DATA::ID => Some(Self::POWER_STATUS(POWER_STATUS_DATA::default())),
37127            PROTOCOL_VERSION_DATA::ID => {
37128                Some(Self::PROTOCOL_VERSION(PROTOCOL_VERSION_DATA::default()))
37129            }
37130            RADIO_STATUS_DATA::ID => Some(Self::RADIO_STATUS(RADIO_STATUS_DATA::default())),
37131            RAW_IMU_DATA::ID => Some(Self::RAW_IMU(RAW_IMU_DATA::default())),
37132            RAW_PRESSURE_DATA::ID => Some(Self::RAW_PRESSURE(RAW_PRESSURE_DATA::default())),
37133            RAW_RPM_DATA::ID => Some(Self::RAW_RPM(RAW_RPM_DATA::default())),
37134            RC_CHANNELS_DATA::ID => Some(Self::RC_CHANNELS(RC_CHANNELS_DATA::default())),
37135            RC_CHANNELS_OVERRIDE_DATA::ID => Some(Self::RC_CHANNELS_OVERRIDE(
37136                RC_CHANNELS_OVERRIDE_DATA::default(),
37137            )),
37138            RC_CHANNELS_RAW_DATA::ID => {
37139                Some(Self::RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA::default()))
37140            }
37141            RC_CHANNELS_SCALED_DATA::ID => {
37142                Some(Self::RC_CHANNELS_SCALED(RC_CHANNELS_SCALED_DATA::default()))
37143            }
37144            REQUEST_DATA_STREAM_DATA::ID => Some(Self::REQUEST_DATA_STREAM(
37145                REQUEST_DATA_STREAM_DATA::default(),
37146            )),
37147            REQUEST_EVENT_DATA::ID => Some(Self::REQUEST_EVENT(REQUEST_EVENT_DATA::default())),
37148            RESOURCE_REQUEST_DATA::ID => {
37149                Some(Self::RESOURCE_REQUEST(RESOURCE_REQUEST_DATA::default()))
37150            }
37151            RESPONSE_EVENT_ERROR_DATA::ID => Some(Self::RESPONSE_EVENT_ERROR(
37152                RESPONSE_EVENT_ERROR_DATA::default(),
37153            )),
37154            SAFETY_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_ALLOWED_AREA(
37155                SAFETY_ALLOWED_AREA_DATA::default(),
37156            )),
37157            SAFETY_SET_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_SET_ALLOWED_AREA(
37158                SAFETY_SET_ALLOWED_AREA_DATA::default(),
37159            )),
37160            SATCOM_LINK_STATUS_DATA::ID => {
37161                Some(Self::SATCOM_LINK_STATUS(SATCOM_LINK_STATUS_DATA::default()))
37162            }
37163            SCALED_IMU_DATA::ID => Some(Self::SCALED_IMU(SCALED_IMU_DATA::default())),
37164            SCALED_IMU2_DATA::ID => Some(Self::SCALED_IMU2(SCALED_IMU2_DATA::default())),
37165            SCALED_IMU3_DATA::ID => Some(Self::SCALED_IMU3(SCALED_IMU3_DATA::default())),
37166            SCALED_PRESSURE_DATA::ID => {
37167                Some(Self::SCALED_PRESSURE(SCALED_PRESSURE_DATA::default()))
37168            }
37169            SCALED_PRESSURE2_DATA::ID => {
37170                Some(Self::SCALED_PRESSURE2(SCALED_PRESSURE2_DATA::default()))
37171            }
37172            SCALED_PRESSURE3_DATA::ID => {
37173                Some(Self::SCALED_PRESSURE3(SCALED_PRESSURE3_DATA::default()))
37174            }
37175            SENSORPOD_STATUS_DATA::ID => {
37176                Some(Self::SENSORPOD_STATUS(SENSORPOD_STATUS_DATA::default()))
37177            }
37178            SENSOR_AIRFLOW_ANGLES_DATA::ID => Some(Self::SENSOR_AIRFLOW_ANGLES(
37179                SENSOR_AIRFLOW_ANGLES_DATA::default(),
37180            )),
37181            SENS_ATMOS_DATA::ID => Some(Self::SENS_ATMOS(SENS_ATMOS_DATA::default())),
37182            SENS_BATMON_DATA::ID => Some(Self::SENS_BATMON(SENS_BATMON_DATA::default())),
37183            SENS_MPPT_DATA::ID => Some(Self::SENS_MPPT(SENS_MPPT_DATA::default())),
37184            SENS_POWER_DATA::ID => Some(Self::SENS_POWER(SENS_POWER_DATA::default())),
37185            SENS_POWER_BOARD_DATA::ID => {
37186                Some(Self::SENS_POWER_BOARD(SENS_POWER_BOARD_DATA::default()))
37187            }
37188            SERIAL_CONTROL_DATA::ID => Some(Self::SERIAL_CONTROL(SERIAL_CONTROL_DATA::default())),
37189            SERVO_OUTPUT_RAW_DATA::ID => {
37190                Some(Self::SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA::default()))
37191            }
37192            SETUP_SIGNING_DATA::ID => Some(Self::SETUP_SIGNING(SETUP_SIGNING_DATA::default())),
37193            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::SET_ACTUATOR_CONTROL_TARGET(
37194                SET_ACTUATOR_CONTROL_TARGET_DATA::default(),
37195            )),
37196            SET_ATTITUDE_TARGET_DATA::ID => Some(Self::SET_ATTITUDE_TARGET(
37197                SET_ATTITUDE_TARGET_DATA::default(),
37198            )),
37199            SET_GPS_GLOBAL_ORIGIN_DATA::ID => Some(Self::SET_GPS_GLOBAL_ORIGIN(
37200                SET_GPS_GLOBAL_ORIGIN_DATA::default(),
37201            )),
37202            SET_HOME_POSITION_DATA::ID => {
37203                Some(Self::SET_HOME_POSITION(SET_HOME_POSITION_DATA::default()))
37204            }
37205            SET_MODE_DATA::ID => Some(Self::SET_MODE(SET_MODE_DATA::default())),
37206            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::SET_POSITION_TARGET_GLOBAL_INT(
37207                SET_POSITION_TARGET_GLOBAL_INT_DATA::default(),
37208            )),
37209            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::SET_POSITION_TARGET_LOCAL_NED(
37210                SET_POSITION_TARGET_LOCAL_NED_DATA::default(),
37211            )),
37212            SIM_STATE_DATA::ID => Some(Self::SIM_STATE(SIM_STATE_DATA::default())),
37213            SMART_BATTERY_INFO_DATA::ID => {
37214                Some(Self::SMART_BATTERY_INFO(SMART_BATTERY_INFO_DATA::default()))
37215            }
37216            STATUSTEXT_DATA::ID => Some(Self::STATUSTEXT(STATUSTEXT_DATA::default())),
37217            STORAGE_INFORMATION_DATA::ID => Some(Self::STORAGE_INFORMATION(
37218                STORAGE_INFORMATION_DATA::default(),
37219            )),
37220            SUPPORTED_TUNES_DATA::ID => {
37221                Some(Self::SUPPORTED_TUNES(SUPPORTED_TUNES_DATA::default()))
37222            }
37223            SYSTEM_TIME_DATA::ID => Some(Self::SYSTEM_TIME(SYSTEM_TIME_DATA::default())),
37224            SYS_STATUS_DATA::ID => Some(Self::SYS_STATUS(SYS_STATUS_DATA::default())),
37225            TERRAIN_CHECK_DATA::ID => Some(Self::TERRAIN_CHECK(TERRAIN_CHECK_DATA::default())),
37226            TERRAIN_DATA_DATA::ID => Some(Self::TERRAIN_DATA(TERRAIN_DATA_DATA::default())),
37227            TERRAIN_REPORT_DATA::ID => Some(Self::TERRAIN_REPORT(TERRAIN_REPORT_DATA::default())),
37228            TERRAIN_REQUEST_DATA::ID => {
37229                Some(Self::TERRAIN_REQUEST(TERRAIN_REQUEST_DATA::default()))
37230            }
37231            TIMESYNC_DATA::ID => Some(Self::TIMESYNC(TIMESYNC_DATA::default())),
37232            TIME_ESTIMATE_TO_TARGET_DATA::ID => Some(Self::TIME_ESTIMATE_TO_TARGET(
37233                TIME_ESTIMATE_TO_TARGET_DATA::default(),
37234            )),
37235            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
37236                Some(Self::TRAJECTORY_REPRESENTATION_BEZIER(
37237                    TRAJECTORY_REPRESENTATION_BEZIER_DATA::default(),
37238                ))
37239            }
37240            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
37241                Some(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(
37242                    TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::default(),
37243                ))
37244            }
37245            TUNNEL_DATA::ID => Some(Self::TUNNEL(TUNNEL_DATA::default())),
37246            UAVCAN_NODE_INFO_DATA::ID => {
37247                Some(Self::UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA::default()))
37248            }
37249            UAVCAN_NODE_STATUS_DATA::ID => {
37250                Some(Self::UAVCAN_NODE_STATUS(UAVCAN_NODE_STATUS_DATA::default()))
37251            }
37252            UTM_GLOBAL_POSITION_DATA::ID => Some(Self::UTM_GLOBAL_POSITION(
37253                UTM_GLOBAL_POSITION_DATA::default(),
37254            )),
37255            V2_EXTENSION_DATA::ID => Some(Self::V2_EXTENSION(V2_EXTENSION_DATA::default())),
37256            VFR_HUD_DATA::ID => Some(Self::VFR_HUD(VFR_HUD_DATA::default())),
37257            VIBRATION_DATA::ID => Some(Self::VIBRATION(VIBRATION_DATA::default())),
37258            VICON_POSITION_ESTIMATE_DATA::ID => Some(Self::VICON_POSITION_ESTIMATE(
37259                VICON_POSITION_ESTIMATE_DATA::default(),
37260            )),
37261            VIDEO_STREAM_INFORMATION_DATA::ID => Some(Self::VIDEO_STREAM_INFORMATION(
37262                VIDEO_STREAM_INFORMATION_DATA::default(),
37263            )),
37264            VIDEO_STREAM_STATUS_DATA::ID => Some(Self::VIDEO_STREAM_STATUS(
37265                VIDEO_STREAM_STATUS_DATA::default(),
37266            )),
37267            VISION_POSITION_ESTIMATE_DATA::ID => Some(Self::VISION_POSITION_ESTIMATE(
37268                VISION_POSITION_ESTIMATE_DATA::default(),
37269            )),
37270            VISION_SPEED_ESTIMATE_DATA::ID => Some(Self::VISION_SPEED_ESTIMATE(
37271                VISION_SPEED_ESTIMATE_DATA::default(),
37272            )),
37273            WHEEL_DISTANCE_DATA::ID => Some(Self::WHEEL_DISTANCE(WHEEL_DISTANCE_DATA::default())),
37274            WIFI_CONFIG_AP_DATA::ID => Some(Self::WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA::default())),
37275            WINCH_STATUS_DATA::ID => Some(Self::WINCH_STATUS(WINCH_STATUS_DATA::default())),
37276            WIND_COV_DATA::ID => Some(Self::WIND_COV(WIND_COV_DATA::default())),
37277            _ => None,
37278        }
37279    }
37280    #[cfg(feature = "arbitrary")]
37281    fn random_message_from_id<R: rand::RngCore>(id: u32, rng: &mut R) -> Option<Self> {
37282        match id {
37283            ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::ACTUATOR_CONTROL_TARGET(
37284                ACTUATOR_CONTROL_TARGET_DATA::random(rng),
37285            )),
37286            ACTUATOR_OUTPUT_STATUS_DATA::ID => Some(Self::ACTUATOR_OUTPUT_STATUS(
37287                ACTUATOR_OUTPUT_STATUS_DATA::random(rng),
37288            )),
37289            ADSB_VEHICLE_DATA::ID => Some(Self::ADSB_VEHICLE(ADSB_VEHICLE_DATA::random(rng))),
37290            AIS_VESSEL_DATA::ID => Some(Self::AIS_VESSEL(AIS_VESSEL_DATA::random(rng))),
37291            ALTITUDE_DATA::ID => Some(Self::ALTITUDE(ALTITUDE_DATA::random(rng))),
37292            ASLCTRL_DATA_DATA::ID => Some(Self::ASLCTRL_DATA(ASLCTRL_DATA_DATA::random(rng))),
37293            ASLCTRL_DEBUG_DATA::ID => Some(Self::ASLCTRL_DEBUG(ASLCTRL_DEBUG_DATA::random(rng))),
37294            ASLUAV_STATUS_DATA::ID => Some(Self::ASLUAV_STATUS(ASLUAV_STATUS_DATA::random(rng))),
37295            ASL_OBCTRL_DATA::ID => Some(Self::ASL_OBCTRL(ASL_OBCTRL_DATA::random(rng))),
37296            ATTITUDE_DATA::ID => Some(Self::ATTITUDE(ATTITUDE_DATA::random(rng))),
37297            ATTITUDE_QUATERNION_DATA::ID => Some(Self::ATTITUDE_QUATERNION(
37298                ATTITUDE_QUATERNION_DATA::random(rng),
37299            )),
37300            ATTITUDE_QUATERNION_COV_DATA::ID => Some(Self::ATTITUDE_QUATERNION_COV(
37301                ATTITUDE_QUATERNION_COV_DATA::random(rng),
37302            )),
37303            ATTITUDE_TARGET_DATA::ID => {
37304                Some(Self::ATTITUDE_TARGET(ATTITUDE_TARGET_DATA::random(rng)))
37305            }
37306            ATT_POS_MOCAP_DATA::ID => Some(Self::ATT_POS_MOCAP(ATT_POS_MOCAP_DATA::random(rng))),
37307            AUTH_KEY_DATA::ID => Some(Self::AUTH_KEY(AUTH_KEY_DATA::random(rng))),
37308            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
37309                Some(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(
37310                    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::random(rng),
37311                ))
37312            }
37313            AUTOPILOT_VERSION_DATA::ID => {
37314                Some(Self::AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA::random(rng)))
37315            }
37316            AVAILABLE_MODES_DATA::ID => {
37317                Some(Self::AVAILABLE_MODES(AVAILABLE_MODES_DATA::random(rng)))
37318            }
37319            AVAILABLE_MODES_MONITOR_DATA::ID => Some(Self::AVAILABLE_MODES_MONITOR(
37320                AVAILABLE_MODES_MONITOR_DATA::random(rng),
37321            )),
37322            BATTERY_INFO_DATA::ID => Some(Self::BATTERY_INFO(BATTERY_INFO_DATA::random(rng))),
37323            BATTERY_STATUS_DATA::ID => Some(Self::BATTERY_STATUS(BATTERY_STATUS_DATA::random(rng))),
37324            BUTTON_CHANGE_DATA::ID => Some(Self::BUTTON_CHANGE(BUTTON_CHANGE_DATA::random(rng))),
37325            CAMERA_CAPTURE_STATUS_DATA::ID => Some(Self::CAMERA_CAPTURE_STATUS(
37326                CAMERA_CAPTURE_STATUS_DATA::random(rng),
37327            )),
37328            CAMERA_FOV_STATUS_DATA::ID => {
37329                Some(Self::CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA::random(rng)))
37330            }
37331            CAMERA_IMAGE_CAPTURED_DATA::ID => Some(Self::CAMERA_IMAGE_CAPTURED(
37332                CAMERA_IMAGE_CAPTURED_DATA::random(rng),
37333            )),
37334            CAMERA_INFORMATION_DATA::ID => Some(Self::CAMERA_INFORMATION(
37335                CAMERA_INFORMATION_DATA::random(rng),
37336            )),
37337            CAMERA_SETTINGS_DATA::ID => {
37338                Some(Self::CAMERA_SETTINGS(CAMERA_SETTINGS_DATA::random(rng)))
37339            }
37340            CAMERA_THERMAL_RANGE_DATA::ID => Some(Self::CAMERA_THERMAL_RANGE(
37341                CAMERA_THERMAL_RANGE_DATA::random(rng),
37342            )),
37343            CAMERA_TRACKING_GEO_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_GEO_STATUS(
37344                CAMERA_TRACKING_GEO_STATUS_DATA::random(rng),
37345            )),
37346            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_IMAGE_STATUS(
37347                CAMERA_TRACKING_IMAGE_STATUS_DATA::random(rng),
37348            )),
37349            CAMERA_TRIGGER_DATA::ID => Some(Self::CAMERA_TRIGGER(CAMERA_TRIGGER_DATA::random(rng))),
37350            CANFD_FRAME_DATA::ID => Some(Self::CANFD_FRAME(CANFD_FRAME_DATA::random(rng))),
37351            CAN_FILTER_MODIFY_DATA::ID => {
37352                Some(Self::CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA::random(rng)))
37353            }
37354            CAN_FRAME_DATA::ID => Some(Self::CAN_FRAME(CAN_FRAME_DATA::random(rng))),
37355            CELLULAR_CONFIG_DATA::ID => {
37356                Some(Self::CELLULAR_CONFIG(CELLULAR_CONFIG_DATA::random(rng)))
37357            }
37358            CELLULAR_STATUS_DATA::ID => {
37359                Some(Self::CELLULAR_STATUS(CELLULAR_STATUS_DATA::random(rng)))
37360            }
37361            CHANGE_OPERATOR_CONTROL_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL(
37362                CHANGE_OPERATOR_CONTROL_DATA::random(rng),
37363            )),
37364            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL_ACK(
37365                CHANGE_OPERATOR_CONTROL_ACK_DATA::random(rng),
37366            )),
37367            COLLISION_DATA::ID => Some(Self::COLLISION(COLLISION_DATA::random(rng))),
37368            COMMAND_ACK_DATA::ID => Some(Self::COMMAND_ACK(COMMAND_ACK_DATA::random(rng))),
37369            COMMAND_CANCEL_DATA::ID => Some(Self::COMMAND_CANCEL(COMMAND_CANCEL_DATA::random(rng))),
37370            COMMAND_INT_DATA::ID => Some(Self::COMMAND_INT(COMMAND_INT_DATA::random(rng))),
37371            COMMAND_INT_STAMPED_DATA::ID => Some(Self::COMMAND_INT_STAMPED(
37372                COMMAND_INT_STAMPED_DATA::random(rng),
37373            )),
37374            COMMAND_LONG_DATA::ID => Some(Self::COMMAND_LONG(COMMAND_LONG_DATA::random(rng))),
37375            COMMAND_LONG_STAMPED_DATA::ID => Some(Self::COMMAND_LONG_STAMPED(
37376                COMMAND_LONG_STAMPED_DATA::random(rng),
37377            )),
37378            COMPONENT_INFORMATION_DATA::ID => Some(Self::COMPONENT_INFORMATION(
37379                COMPONENT_INFORMATION_DATA::random(rng),
37380            )),
37381            COMPONENT_INFORMATION_BASIC_DATA::ID => Some(Self::COMPONENT_INFORMATION_BASIC(
37382                COMPONENT_INFORMATION_BASIC_DATA::random(rng),
37383            )),
37384            COMPONENT_METADATA_DATA::ID => Some(Self::COMPONENT_METADATA(
37385                COMPONENT_METADATA_DATA::random(rng),
37386            )),
37387            CONTROL_SYSTEM_STATE_DATA::ID => Some(Self::CONTROL_SYSTEM_STATE(
37388                CONTROL_SYSTEM_STATE_DATA::random(rng),
37389            )),
37390            CURRENT_EVENT_SEQUENCE_DATA::ID => Some(Self::CURRENT_EVENT_SEQUENCE(
37391                CURRENT_EVENT_SEQUENCE_DATA::random(rng),
37392            )),
37393            CURRENT_MODE_DATA::ID => Some(Self::CURRENT_MODE(CURRENT_MODE_DATA::random(rng))),
37394            DATA_STREAM_DATA::ID => Some(Self::DATA_STREAM(DATA_STREAM_DATA::random(rng))),
37395            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => Some(Self::DATA_TRANSMISSION_HANDSHAKE(
37396                DATA_TRANSMISSION_HANDSHAKE_DATA::random(rng),
37397            )),
37398            DEBUG_DATA::ID => Some(Self::DEBUG(DEBUG_DATA::random(rng))),
37399            DEBUG_FLOAT_ARRAY_DATA::ID => {
37400                Some(Self::DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA::random(rng)))
37401            }
37402            DEBUG_VECT_DATA::ID => Some(Self::DEBUG_VECT(DEBUG_VECT_DATA::random(rng))),
37403            DISTANCE_SENSOR_DATA::ID => {
37404                Some(Self::DISTANCE_SENSOR(DISTANCE_SENSOR_DATA::random(rng)))
37405            }
37406            EFI_STATUS_DATA::ID => Some(Self::EFI_STATUS(EFI_STATUS_DATA::random(rng))),
37407            EKF_EXT_DATA::ID => Some(Self::EKF_EXT(EKF_EXT_DATA::random(rng))),
37408            ENCAPSULATED_DATA_DATA::ID => {
37409                Some(Self::ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA::random(rng)))
37410            }
37411            ESC_INFO_DATA::ID => Some(Self::ESC_INFO(ESC_INFO_DATA::random(rng))),
37412            ESC_STATUS_DATA::ID => Some(Self::ESC_STATUS(ESC_STATUS_DATA::random(rng))),
37413            ESTIMATOR_STATUS_DATA::ID => {
37414                Some(Self::ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA::random(rng)))
37415            }
37416            EVENT_DATA::ID => Some(Self::EVENT(EVENT_DATA::random(rng))),
37417            EXTENDED_SYS_STATE_DATA::ID => Some(Self::EXTENDED_SYS_STATE(
37418                EXTENDED_SYS_STATE_DATA::random(rng),
37419            )),
37420            FENCE_STATUS_DATA::ID => Some(Self::FENCE_STATUS(FENCE_STATUS_DATA::random(rng))),
37421            FILE_TRANSFER_PROTOCOL_DATA::ID => Some(Self::FILE_TRANSFER_PROTOCOL(
37422                FILE_TRANSFER_PROTOCOL_DATA::random(rng),
37423            )),
37424            FLIGHT_INFORMATION_DATA::ID => Some(Self::FLIGHT_INFORMATION(
37425                FLIGHT_INFORMATION_DATA::random(rng),
37426            )),
37427            FOLLOW_TARGET_DATA::ID => Some(Self::FOLLOW_TARGET(FOLLOW_TARGET_DATA::random(rng))),
37428            FUEL_STATUS_DATA::ID => Some(Self::FUEL_STATUS(FUEL_STATUS_DATA::random(rng))),
37429            FW_SOARING_DATA_DATA::ID => {
37430                Some(Self::FW_SOARING_DATA(FW_SOARING_DATA_DATA::random(rng)))
37431            }
37432            GENERATOR_STATUS_DATA::ID => {
37433                Some(Self::GENERATOR_STATUS(GENERATOR_STATUS_DATA::random(rng)))
37434            }
37435            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => Some(Self::GIMBAL_DEVICE_ATTITUDE_STATUS(
37436                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::random(rng),
37437            )),
37438            GIMBAL_DEVICE_INFORMATION_DATA::ID => Some(Self::GIMBAL_DEVICE_INFORMATION(
37439                GIMBAL_DEVICE_INFORMATION_DATA::random(rng),
37440            )),
37441            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_DEVICE_SET_ATTITUDE(
37442                GIMBAL_DEVICE_SET_ATTITUDE_DATA::random(rng),
37443            )),
37444            GIMBAL_MANAGER_INFORMATION_DATA::ID => Some(Self::GIMBAL_MANAGER_INFORMATION(
37445                GIMBAL_MANAGER_INFORMATION_DATA::random(rng),
37446            )),
37447            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_ATTITUDE(
37448                GIMBAL_MANAGER_SET_ATTITUDE_DATA::random(rng),
37449            )),
37450            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
37451                Some(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(
37452                    GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::random(rng),
37453                ))
37454            }
37455            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_PITCHYAW(
37456                GIMBAL_MANAGER_SET_PITCHYAW_DATA::random(rng),
37457            )),
37458            GIMBAL_MANAGER_STATUS_DATA::ID => Some(Self::GIMBAL_MANAGER_STATUS(
37459                GIMBAL_MANAGER_STATUS_DATA::random(rng),
37460            )),
37461            GLOBAL_POSITION_INT_DATA::ID => Some(Self::GLOBAL_POSITION_INT(
37462                GLOBAL_POSITION_INT_DATA::random(rng),
37463            )),
37464            GLOBAL_POSITION_INT_COV_DATA::ID => Some(Self::GLOBAL_POSITION_INT_COV(
37465                GLOBAL_POSITION_INT_COV_DATA::random(rng),
37466            )),
37467            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
37468                Some(Self::GLOBAL_VISION_POSITION_ESTIMATE(
37469                    GLOBAL_VISION_POSITION_ESTIMATE_DATA::random(rng),
37470                ))
37471            }
37472            GPS2_RAW_DATA::ID => Some(Self::GPS2_RAW(GPS2_RAW_DATA::random(rng))),
37473            GPS2_RTK_DATA::ID => Some(Self::GPS2_RTK(GPS2_RTK_DATA::random(rng))),
37474            GPS_GLOBAL_ORIGIN_DATA::ID => {
37475                Some(Self::GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA::random(rng)))
37476            }
37477            GPS_INJECT_DATA_DATA::ID => {
37478                Some(Self::GPS_INJECT_DATA(GPS_INJECT_DATA_DATA::random(rng)))
37479            }
37480            GPS_INPUT_DATA::ID => Some(Self::GPS_INPUT(GPS_INPUT_DATA::random(rng))),
37481            GPS_RAW_INT_DATA::ID => Some(Self::GPS_RAW_INT(GPS_RAW_INT_DATA::random(rng))),
37482            GPS_RTCM_DATA_DATA::ID => Some(Self::GPS_RTCM_DATA(GPS_RTCM_DATA_DATA::random(rng))),
37483            GPS_RTK_DATA::ID => Some(Self::GPS_RTK(GPS_RTK_DATA::random(rng))),
37484            GPS_STATUS_DATA::ID => Some(Self::GPS_STATUS(GPS_STATUS_DATA::random(rng))),
37485            GSM_LINK_STATUS_DATA::ID => {
37486                Some(Self::GSM_LINK_STATUS(GSM_LINK_STATUS_DATA::random(rng)))
37487            }
37488            HEARTBEAT_DATA::ID => Some(Self::HEARTBEAT(HEARTBEAT_DATA::random(rng))),
37489            HIGHRES_IMU_DATA::ID => Some(Self::HIGHRES_IMU(HIGHRES_IMU_DATA::random(rng))),
37490            HIGH_LATENCY_DATA::ID => Some(Self::HIGH_LATENCY(HIGH_LATENCY_DATA::random(rng))),
37491            HIGH_LATENCY2_DATA::ID => Some(Self::HIGH_LATENCY2(HIGH_LATENCY2_DATA::random(rng))),
37492            HIL_ACTUATOR_CONTROLS_DATA::ID => Some(Self::HIL_ACTUATOR_CONTROLS(
37493                HIL_ACTUATOR_CONTROLS_DATA::random(rng),
37494            )),
37495            HIL_CONTROLS_DATA::ID => Some(Self::HIL_CONTROLS(HIL_CONTROLS_DATA::random(rng))),
37496            HIL_GPS_DATA::ID => Some(Self::HIL_GPS(HIL_GPS_DATA::random(rng))),
37497            HIL_OPTICAL_FLOW_DATA::ID => {
37498                Some(Self::HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA::random(rng)))
37499            }
37500            HIL_RC_INPUTS_RAW_DATA::ID => {
37501                Some(Self::HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA::random(rng)))
37502            }
37503            HIL_SENSOR_DATA::ID => Some(Self::HIL_SENSOR(HIL_SENSOR_DATA::random(rng))),
37504            HIL_STATE_DATA::ID => Some(Self::HIL_STATE(HIL_STATE_DATA::random(rng))),
37505            HIL_STATE_QUATERNION_DATA::ID => Some(Self::HIL_STATE_QUATERNION(
37506                HIL_STATE_QUATERNION_DATA::random(rng),
37507            )),
37508            HOME_POSITION_DATA::ID => Some(Self::HOME_POSITION(HOME_POSITION_DATA::random(rng))),
37509            HYGROMETER_SENSOR_DATA::ID => {
37510                Some(Self::HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA::random(rng)))
37511            }
37512            ILLUMINATOR_STATUS_DATA::ID => Some(Self::ILLUMINATOR_STATUS(
37513                ILLUMINATOR_STATUS_DATA::random(rng),
37514            )),
37515            ISBD_LINK_STATUS_DATA::ID => {
37516                Some(Self::ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA::random(rng)))
37517            }
37518            LANDING_TARGET_DATA::ID => Some(Self::LANDING_TARGET(LANDING_TARGET_DATA::random(rng))),
37519            LINK_NODE_STATUS_DATA::ID => {
37520                Some(Self::LINK_NODE_STATUS(LINK_NODE_STATUS_DATA::random(rng)))
37521            }
37522            LOCAL_POSITION_NED_DATA::ID => Some(Self::LOCAL_POSITION_NED(
37523                LOCAL_POSITION_NED_DATA::random(rng),
37524            )),
37525            LOCAL_POSITION_NED_COV_DATA::ID => Some(Self::LOCAL_POSITION_NED_COV(
37526                LOCAL_POSITION_NED_COV_DATA::random(rng),
37527            )),
37528            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
37529                Some(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(
37530                    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::random(rng),
37531                ))
37532            }
37533            LOGGING_ACK_DATA::ID => Some(Self::LOGGING_ACK(LOGGING_ACK_DATA::random(rng))),
37534            LOGGING_DATA_DATA::ID => Some(Self::LOGGING_DATA(LOGGING_DATA_DATA::random(rng))),
37535            LOGGING_DATA_ACKED_DATA::ID => Some(Self::LOGGING_DATA_ACKED(
37536                LOGGING_DATA_ACKED_DATA::random(rng),
37537            )),
37538            LOG_DATA_DATA::ID => Some(Self::LOG_DATA(LOG_DATA_DATA::random(rng))),
37539            LOG_ENTRY_DATA::ID => Some(Self::LOG_ENTRY(LOG_ENTRY_DATA::random(rng))),
37540            LOG_ERASE_DATA::ID => Some(Self::LOG_ERASE(LOG_ERASE_DATA::random(rng))),
37541            LOG_REQUEST_DATA_DATA::ID => {
37542                Some(Self::LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA::random(rng)))
37543            }
37544            LOG_REQUEST_END_DATA::ID => {
37545                Some(Self::LOG_REQUEST_END(LOG_REQUEST_END_DATA::random(rng)))
37546            }
37547            LOG_REQUEST_LIST_DATA::ID => {
37548                Some(Self::LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA::random(rng)))
37549            }
37550            MAG_CAL_REPORT_DATA::ID => Some(Self::MAG_CAL_REPORT(MAG_CAL_REPORT_DATA::random(rng))),
37551            MANUAL_CONTROL_DATA::ID => Some(Self::MANUAL_CONTROL(MANUAL_CONTROL_DATA::random(rng))),
37552            MANUAL_SETPOINT_DATA::ID => {
37553                Some(Self::MANUAL_SETPOINT(MANUAL_SETPOINT_DATA::random(rng)))
37554            }
37555            MEMORY_VECT_DATA::ID => Some(Self::MEMORY_VECT(MEMORY_VECT_DATA::random(rng))),
37556            MESSAGE_INTERVAL_DATA::ID => {
37557                Some(Self::MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA::random(rng)))
37558            }
37559            MISSION_ACK_DATA::ID => Some(Self::MISSION_ACK(MISSION_ACK_DATA::random(rng))),
37560            MISSION_CLEAR_ALL_DATA::ID => {
37561                Some(Self::MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA::random(rng)))
37562            }
37563            MISSION_COUNT_DATA::ID => Some(Self::MISSION_COUNT(MISSION_COUNT_DATA::random(rng))),
37564            MISSION_CURRENT_DATA::ID => {
37565                Some(Self::MISSION_CURRENT(MISSION_CURRENT_DATA::random(rng)))
37566            }
37567            MISSION_ITEM_DATA::ID => Some(Self::MISSION_ITEM(MISSION_ITEM_DATA::random(rng))),
37568            MISSION_ITEM_INT_DATA::ID => {
37569                Some(Self::MISSION_ITEM_INT(MISSION_ITEM_INT_DATA::random(rng)))
37570            }
37571            MISSION_ITEM_REACHED_DATA::ID => Some(Self::MISSION_ITEM_REACHED(
37572                MISSION_ITEM_REACHED_DATA::random(rng),
37573            )),
37574            MISSION_REQUEST_DATA::ID => {
37575                Some(Self::MISSION_REQUEST(MISSION_REQUEST_DATA::random(rng)))
37576            }
37577            MISSION_REQUEST_INT_DATA::ID => Some(Self::MISSION_REQUEST_INT(
37578                MISSION_REQUEST_INT_DATA::random(rng),
37579            )),
37580            MISSION_REQUEST_LIST_DATA::ID => Some(Self::MISSION_REQUEST_LIST(
37581                MISSION_REQUEST_LIST_DATA::random(rng),
37582            )),
37583            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_REQUEST_PARTIAL_LIST(
37584                MISSION_REQUEST_PARTIAL_LIST_DATA::random(rng),
37585            )),
37586            MISSION_SET_CURRENT_DATA::ID => Some(Self::MISSION_SET_CURRENT(
37587                MISSION_SET_CURRENT_DATA::random(rng),
37588            )),
37589            MISSION_WRITE_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_WRITE_PARTIAL_LIST(
37590                MISSION_WRITE_PARTIAL_LIST_DATA::random(rng),
37591            )),
37592            MOUNT_ORIENTATION_DATA::ID => {
37593                Some(Self::MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA::random(rng)))
37594            }
37595            NAMED_VALUE_FLOAT_DATA::ID => {
37596                Some(Self::NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA::random(rng)))
37597            }
37598            NAMED_VALUE_INT_DATA::ID => {
37599                Some(Self::NAMED_VALUE_INT(NAMED_VALUE_INT_DATA::random(rng)))
37600            }
37601            NAV_CONTROLLER_OUTPUT_DATA::ID => Some(Self::NAV_CONTROLLER_OUTPUT(
37602                NAV_CONTROLLER_OUTPUT_DATA::random(rng),
37603            )),
37604            OBSTACLE_DISTANCE_DATA::ID => {
37605                Some(Self::OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA::random(rng)))
37606            }
37607            ODOMETRY_DATA::ID => Some(Self::ODOMETRY(ODOMETRY_DATA::random(rng))),
37608            ONBOARD_COMPUTER_STATUS_DATA::ID => Some(Self::ONBOARD_COMPUTER_STATUS(
37609                ONBOARD_COMPUTER_STATUS_DATA::random(rng),
37610            )),
37611            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => Some(Self::OPEN_DRONE_ID_ARM_STATUS(
37612                OPEN_DRONE_ID_ARM_STATUS_DATA::random(rng),
37613            )),
37614            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => Some(Self::OPEN_DRONE_ID_AUTHENTICATION(
37615                OPEN_DRONE_ID_AUTHENTICATION_DATA::random(rng),
37616            )),
37617            OPEN_DRONE_ID_BASIC_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_BASIC_ID(
37618                OPEN_DRONE_ID_BASIC_ID_DATA::random(rng),
37619            )),
37620            OPEN_DRONE_ID_LOCATION_DATA::ID => Some(Self::OPEN_DRONE_ID_LOCATION(
37621                OPEN_DRONE_ID_LOCATION_DATA::random(rng),
37622            )),
37623            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => Some(Self::OPEN_DRONE_ID_MESSAGE_PACK(
37624                OPEN_DRONE_ID_MESSAGE_PACK_DATA::random(rng),
37625            )),
37626            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_OPERATOR_ID(
37627                OPEN_DRONE_ID_OPERATOR_ID_DATA::random(rng),
37628            )),
37629            OPEN_DRONE_ID_SELF_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_SELF_ID(
37630                OPEN_DRONE_ID_SELF_ID_DATA::random(rng),
37631            )),
37632            OPEN_DRONE_ID_SYSTEM_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM(
37633                OPEN_DRONE_ID_SYSTEM_DATA::random(rng),
37634            )),
37635            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM_UPDATE(
37636                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::random(rng),
37637            )),
37638            OPTICAL_FLOW_DATA::ID => Some(Self::OPTICAL_FLOW(OPTICAL_FLOW_DATA::random(rng))),
37639            OPTICAL_FLOW_RAD_DATA::ID => {
37640                Some(Self::OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA::random(rng)))
37641            }
37642            ORBIT_EXECUTION_STATUS_DATA::ID => Some(Self::ORBIT_EXECUTION_STATUS(
37643                ORBIT_EXECUTION_STATUS_DATA::random(rng),
37644            )),
37645            PARAM_EXT_ACK_DATA::ID => Some(Self::PARAM_EXT_ACK(PARAM_EXT_ACK_DATA::random(rng))),
37646            PARAM_EXT_REQUEST_LIST_DATA::ID => Some(Self::PARAM_EXT_REQUEST_LIST(
37647                PARAM_EXT_REQUEST_LIST_DATA::random(rng),
37648            )),
37649            PARAM_EXT_REQUEST_READ_DATA::ID => Some(Self::PARAM_EXT_REQUEST_READ(
37650                PARAM_EXT_REQUEST_READ_DATA::random(rng),
37651            )),
37652            PARAM_EXT_SET_DATA::ID => Some(Self::PARAM_EXT_SET(PARAM_EXT_SET_DATA::random(rng))),
37653            PARAM_EXT_VALUE_DATA::ID => {
37654                Some(Self::PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA::random(rng)))
37655            }
37656            PARAM_MAP_RC_DATA::ID => Some(Self::PARAM_MAP_RC(PARAM_MAP_RC_DATA::random(rng))),
37657            PARAM_REQUEST_LIST_DATA::ID => Some(Self::PARAM_REQUEST_LIST(
37658                PARAM_REQUEST_LIST_DATA::random(rng),
37659            )),
37660            PARAM_REQUEST_READ_DATA::ID => Some(Self::PARAM_REQUEST_READ(
37661                PARAM_REQUEST_READ_DATA::random(rng),
37662            )),
37663            PARAM_SET_DATA::ID => Some(Self::PARAM_SET(PARAM_SET_DATA::random(rng))),
37664            PARAM_VALUE_DATA::ID => Some(Self::PARAM_VALUE(PARAM_VALUE_DATA::random(rng))),
37665            PING_DATA::ID => Some(Self::PING(PING_DATA::random(rng))),
37666            PLAY_TUNE_DATA::ID => Some(Self::PLAY_TUNE(PLAY_TUNE_DATA::random(rng))),
37667            PLAY_TUNE_V2_DATA::ID => Some(Self::PLAY_TUNE_V2(PLAY_TUNE_V2_DATA::random(rng))),
37668            POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::POSITION_TARGET_GLOBAL_INT(
37669                POSITION_TARGET_GLOBAL_INT_DATA::random(rng),
37670            )),
37671            POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::POSITION_TARGET_LOCAL_NED(
37672                POSITION_TARGET_LOCAL_NED_DATA::random(rng),
37673            )),
37674            POWER_STATUS_DATA::ID => Some(Self::POWER_STATUS(POWER_STATUS_DATA::random(rng))),
37675            PROTOCOL_VERSION_DATA::ID => {
37676                Some(Self::PROTOCOL_VERSION(PROTOCOL_VERSION_DATA::random(rng)))
37677            }
37678            RADIO_STATUS_DATA::ID => Some(Self::RADIO_STATUS(RADIO_STATUS_DATA::random(rng))),
37679            RAW_IMU_DATA::ID => Some(Self::RAW_IMU(RAW_IMU_DATA::random(rng))),
37680            RAW_PRESSURE_DATA::ID => Some(Self::RAW_PRESSURE(RAW_PRESSURE_DATA::random(rng))),
37681            RAW_RPM_DATA::ID => Some(Self::RAW_RPM(RAW_RPM_DATA::random(rng))),
37682            RC_CHANNELS_DATA::ID => Some(Self::RC_CHANNELS(RC_CHANNELS_DATA::random(rng))),
37683            RC_CHANNELS_OVERRIDE_DATA::ID => Some(Self::RC_CHANNELS_OVERRIDE(
37684                RC_CHANNELS_OVERRIDE_DATA::random(rng),
37685            )),
37686            RC_CHANNELS_RAW_DATA::ID => {
37687                Some(Self::RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA::random(rng)))
37688            }
37689            RC_CHANNELS_SCALED_DATA::ID => Some(Self::RC_CHANNELS_SCALED(
37690                RC_CHANNELS_SCALED_DATA::random(rng),
37691            )),
37692            REQUEST_DATA_STREAM_DATA::ID => Some(Self::REQUEST_DATA_STREAM(
37693                REQUEST_DATA_STREAM_DATA::random(rng),
37694            )),
37695            REQUEST_EVENT_DATA::ID => Some(Self::REQUEST_EVENT(REQUEST_EVENT_DATA::random(rng))),
37696            RESOURCE_REQUEST_DATA::ID => {
37697                Some(Self::RESOURCE_REQUEST(RESOURCE_REQUEST_DATA::random(rng)))
37698            }
37699            RESPONSE_EVENT_ERROR_DATA::ID => Some(Self::RESPONSE_EVENT_ERROR(
37700                RESPONSE_EVENT_ERROR_DATA::random(rng),
37701            )),
37702            SAFETY_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_ALLOWED_AREA(
37703                SAFETY_ALLOWED_AREA_DATA::random(rng),
37704            )),
37705            SAFETY_SET_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_SET_ALLOWED_AREA(
37706                SAFETY_SET_ALLOWED_AREA_DATA::random(rng),
37707            )),
37708            SATCOM_LINK_STATUS_DATA::ID => Some(Self::SATCOM_LINK_STATUS(
37709                SATCOM_LINK_STATUS_DATA::random(rng),
37710            )),
37711            SCALED_IMU_DATA::ID => Some(Self::SCALED_IMU(SCALED_IMU_DATA::random(rng))),
37712            SCALED_IMU2_DATA::ID => Some(Self::SCALED_IMU2(SCALED_IMU2_DATA::random(rng))),
37713            SCALED_IMU3_DATA::ID => Some(Self::SCALED_IMU3(SCALED_IMU3_DATA::random(rng))),
37714            SCALED_PRESSURE_DATA::ID => {
37715                Some(Self::SCALED_PRESSURE(SCALED_PRESSURE_DATA::random(rng)))
37716            }
37717            SCALED_PRESSURE2_DATA::ID => {
37718                Some(Self::SCALED_PRESSURE2(SCALED_PRESSURE2_DATA::random(rng)))
37719            }
37720            SCALED_PRESSURE3_DATA::ID => {
37721                Some(Self::SCALED_PRESSURE3(SCALED_PRESSURE3_DATA::random(rng)))
37722            }
37723            SENSORPOD_STATUS_DATA::ID => {
37724                Some(Self::SENSORPOD_STATUS(SENSORPOD_STATUS_DATA::random(rng)))
37725            }
37726            SENSOR_AIRFLOW_ANGLES_DATA::ID => Some(Self::SENSOR_AIRFLOW_ANGLES(
37727                SENSOR_AIRFLOW_ANGLES_DATA::random(rng),
37728            )),
37729            SENS_ATMOS_DATA::ID => Some(Self::SENS_ATMOS(SENS_ATMOS_DATA::random(rng))),
37730            SENS_BATMON_DATA::ID => Some(Self::SENS_BATMON(SENS_BATMON_DATA::random(rng))),
37731            SENS_MPPT_DATA::ID => Some(Self::SENS_MPPT(SENS_MPPT_DATA::random(rng))),
37732            SENS_POWER_DATA::ID => Some(Self::SENS_POWER(SENS_POWER_DATA::random(rng))),
37733            SENS_POWER_BOARD_DATA::ID => {
37734                Some(Self::SENS_POWER_BOARD(SENS_POWER_BOARD_DATA::random(rng)))
37735            }
37736            SERIAL_CONTROL_DATA::ID => Some(Self::SERIAL_CONTROL(SERIAL_CONTROL_DATA::random(rng))),
37737            SERVO_OUTPUT_RAW_DATA::ID => {
37738                Some(Self::SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA::random(rng)))
37739            }
37740            SETUP_SIGNING_DATA::ID => Some(Self::SETUP_SIGNING(SETUP_SIGNING_DATA::random(rng))),
37741            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::SET_ACTUATOR_CONTROL_TARGET(
37742                SET_ACTUATOR_CONTROL_TARGET_DATA::random(rng),
37743            )),
37744            SET_ATTITUDE_TARGET_DATA::ID => Some(Self::SET_ATTITUDE_TARGET(
37745                SET_ATTITUDE_TARGET_DATA::random(rng),
37746            )),
37747            SET_GPS_GLOBAL_ORIGIN_DATA::ID => Some(Self::SET_GPS_GLOBAL_ORIGIN(
37748                SET_GPS_GLOBAL_ORIGIN_DATA::random(rng),
37749            )),
37750            SET_HOME_POSITION_DATA::ID => {
37751                Some(Self::SET_HOME_POSITION(SET_HOME_POSITION_DATA::random(rng)))
37752            }
37753            SET_MODE_DATA::ID => Some(Self::SET_MODE(SET_MODE_DATA::random(rng))),
37754            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::SET_POSITION_TARGET_GLOBAL_INT(
37755                SET_POSITION_TARGET_GLOBAL_INT_DATA::random(rng),
37756            )),
37757            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::SET_POSITION_TARGET_LOCAL_NED(
37758                SET_POSITION_TARGET_LOCAL_NED_DATA::random(rng),
37759            )),
37760            SIM_STATE_DATA::ID => Some(Self::SIM_STATE(SIM_STATE_DATA::random(rng))),
37761            SMART_BATTERY_INFO_DATA::ID => Some(Self::SMART_BATTERY_INFO(
37762                SMART_BATTERY_INFO_DATA::random(rng),
37763            )),
37764            STATUSTEXT_DATA::ID => Some(Self::STATUSTEXT(STATUSTEXT_DATA::random(rng))),
37765            STORAGE_INFORMATION_DATA::ID => Some(Self::STORAGE_INFORMATION(
37766                STORAGE_INFORMATION_DATA::random(rng),
37767            )),
37768            SUPPORTED_TUNES_DATA::ID => {
37769                Some(Self::SUPPORTED_TUNES(SUPPORTED_TUNES_DATA::random(rng)))
37770            }
37771            SYSTEM_TIME_DATA::ID => Some(Self::SYSTEM_TIME(SYSTEM_TIME_DATA::random(rng))),
37772            SYS_STATUS_DATA::ID => Some(Self::SYS_STATUS(SYS_STATUS_DATA::random(rng))),
37773            TERRAIN_CHECK_DATA::ID => Some(Self::TERRAIN_CHECK(TERRAIN_CHECK_DATA::random(rng))),
37774            TERRAIN_DATA_DATA::ID => Some(Self::TERRAIN_DATA(TERRAIN_DATA_DATA::random(rng))),
37775            TERRAIN_REPORT_DATA::ID => Some(Self::TERRAIN_REPORT(TERRAIN_REPORT_DATA::random(rng))),
37776            TERRAIN_REQUEST_DATA::ID => {
37777                Some(Self::TERRAIN_REQUEST(TERRAIN_REQUEST_DATA::random(rng)))
37778            }
37779            TIMESYNC_DATA::ID => Some(Self::TIMESYNC(TIMESYNC_DATA::random(rng))),
37780            TIME_ESTIMATE_TO_TARGET_DATA::ID => Some(Self::TIME_ESTIMATE_TO_TARGET(
37781                TIME_ESTIMATE_TO_TARGET_DATA::random(rng),
37782            )),
37783            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
37784                Some(Self::TRAJECTORY_REPRESENTATION_BEZIER(
37785                    TRAJECTORY_REPRESENTATION_BEZIER_DATA::random(rng),
37786                ))
37787            }
37788            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
37789                Some(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(
37790                    TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::random(rng),
37791                ))
37792            }
37793            TUNNEL_DATA::ID => Some(Self::TUNNEL(TUNNEL_DATA::random(rng))),
37794            UAVCAN_NODE_INFO_DATA::ID => {
37795                Some(Self::UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA::random(rng)))
37796            }
37797            UAVCAN_NODE_STATUS_DATA::ID => Some(Self::UAVCAN_NODE_STATUS(
37798                UAVCAN_NODE_STATUS_DATA::random(rng),
37799            )),
37800            UTM_GLOBAL_POSITION_DATA::ID => Some(Self::UTM_GLOBAL_POSITION(
37801                UTM_GLOBAL_POSITION_DATA::random(rng),
37802            )),
37803            V2_EXTENSION_DATA::ID => Some(Self::V2_EXTENSION(V2_EXTENSION_DATA::random(rng))),
37804            VFR_HUD_DATA::ID => Some(Self::VFR_HUD(VFR_HUD_DATA::random(rng))),
37805            VIBRATION_DATA::ID => Some(Self::VIBRATION(VIBRATION_DATA::random(rng))),
37806            VICON_POSITION_ESTIMATE_DATA::ID => Some(Self::VICON_POSITION_ESTIMATE(
37807                VICON_POSITION_ESTIMATE_DATA::random(rng),
37808            )),
37809            VIDEO_STREAM_INFORMATION_DATA::ID => Some(Self::VIDEO_STREAM_INFORMATION(
37810                VIDEO_STREAM_INFORMATION_DATA::random(rng),
37811            )),
37812            VIDEO_STREAM_STATUS_DATA::ID => Some(Self::VIDEO_STREAM_STATUS(
37813                VIDEO_STREAM_STATUS_DATA::random(rng),
37814            )),
37815            VISION_POSITION_ESTIMATE_DATA::ID => Some(Self::VISION_POSITION_ESTIMATE(
37816                VISION_POSITION_ESTIMATE_DATA::random(rng),
37817            )),
37818            VISION_SPEED_ESTIMATE_DATA::ID => Some(Self::VISION_SPEED_ESTIMATE(
37819                VISION_SPEED_ESTIMATE_DATA::random(rng),
37820            )),
37821            WHEEL_DISTANCE_DATA::ID => Some(Self::WHEEL_DISTANCE(WHEEL_DISTANCE_DATA::random(rng))),
37822            WIFI_CONFIG_AP_DATA::ID => Some(Self::WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA::random(rng))),
37823            WINCH_STATUS_DATA::ID => Some(Self::WINCH_STATUS(WINCH_STATUS_DATA::random(rng))),
37824            WIND_COV_DATA::ID => Some(Self::WIND_COV(WIND_COV_DATA::random(rng))),
37825            _ => None,
37826        }
37827    }
37828    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
37829        match self {
37830            Self::ACTUATOR_CONTROL_TARGET(body) => body.ser(version, bytes),
37831            Self::ACTUATOR_OUTPUT_STATUS(body) => body.ser(version, bytes),
37832            Self::ADSB_VEHICLE(body) => body.ser(version, bytes),
37833            Self::AIS_VESSEL(body) => body.ser(version, bytes),
37834            Self::ALTITUDE(body) => body.ser(version, bytes),
37835            Self::ASLCTRL_DATA(body) => body.ser(version, bytes),
37836            Self::ASLCTRL_DEBUG(body) => body.ser(version, bytes),
37837            Self::ASLUAV_STATUS(body) => body.ser(version, bytes),
37838            Self::ASL_OBCTRL(body) => body.ser(version, bytes),
37839            Self::ATTITUDE(body) => body.ser(version, bytes),
37840            Self::ATTITUDE_QUATERNION(body) => body.ser(version, bytes),
37841            Self::ATTITUDE_QUATERNION_COV(body) => body.ser(version, bytes),
37842            Self::ATTITUDE_TARGET(body) => body.ser(version, bytes),
37843            Self::ATT_POS_MOCAP(body) => body.ser(version, bytes),
37844            Self::AUTH_KEY(body) => body.ser(version, bytes),
37845            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(body) => body.ser(version, bytes),
37846            Self::AUTOPILOT_VERSION(body) => body.ser(version, bytes),
37847            Self::AVAILABLE_MODES(body) => body.ser(version, bytes),
37848            Self::AVAILABLE_MODES_MONITOR(body) => body.ser(version, bytes),
37849            Self::BATTERY_INFO(body) => body.ser(version, bytes),
37850            Self::BATTERY_STATUS(body) => body.ser(version, bytes),
37851            Self::BUTTON_CHANGE(body) => body.ser(version, bytes),
37852            Self::CAMERA_CAPTURE_STATUS(body) => body.ser(version, bytes),
37853            Self::CAMERA_FOV_STATUS(body) => body.ser(version, bytes),
37854            Self::CAMERA_IMAGE_CAPTURED(body) => body.ser(version, bytes),
37855            Self::CAMERA_INFORMATION(body) => body.ser(version, bytes),
37856            Self::CAMERA_SETTINGS(body) => body.ser(version, bytes),
37857            Self::CAMERA_THERMAL_RANGE(body) => body.ser(version, bytes),
37858            Self::CAMERA_TRACKING_GEO_STATUS(body) => body.ser(version, bytes),
37859            Self::CAMERA_TRACKING_IMAGE_STATUS(body) => body.ser(version, bytes),
37860            Self::CAMERA_TRIGGER(body) => body.ser(version, bytes),
37861            Self::CANFD_FRAME(body) => body.ser(version, bytes),
37862            Self::CAN_FILTER_MODIFY(body) => body.ser(version, bytes),
37863            Self::CAN_FRAME(body) => body.ser(version, bytes),
37864            Self::CELLULAR_CONFIG(body) => body.ser(version, bytes),
37865            Self::CELLULAR_STATUS(body) => body.ser(version, bytes),
37866            Self::CHANGE_OPERATOR_CONTROL(body) => body.ser(version, bytes),
37867            Self::CHANGE_OPERATOR_CONTROL_ACK(body) => body.ser(version, bytes),
37868            Self::COLLISION(body) => body.ser(version, bytes),
37869            Self::COMMAND_ACK(body) => body.ser(version, bytes),
37870            Self::COMMAND_CANCEL(body) => body.ser(version, bytes),
37871            Self::COMMAND_INT(body) => body.ser(version, bytes),
37872            Self::COMMAND_INT_STAMPED(body) => body.ser(version, bytes),
37873            Self::COMMAND_LONG(body) => body.ser(version, bytes),
37874            Self::COMMAND_LONG_STAMPED(body) => body.ser(version, bytes),
37875            Self::COMPONENT_INFORMATION(body) => body.ser(version, bytes),
37876            Self::COMPONENT_INFORMATION_BASIC(body) => body.ser(version, bytes),
37877            Self::COMPONENT_METADATA(body) => body.ser(version, bytes),
37878            Self::CONTROL_SYSTEM_STATE(body) => body.ser(version, bytes),
37879            Self::CURRENT_EVENT_SEQUENCE(body) => body.ser(version, bytes),
37880            Self::CURRENT_MODE(body) => body.ser(version, bytes),
37881            Self::DATA_STREAM(body) => body.ser(version, bytes),
37882            Self::DATA_TRANSMISSION_HANDSHAKE(body) => body.ser(version, bytes),
37883            Self::DEBUG(body) => body.ser(version, bytes),
37884            Self::DEBUG_FLOAT_ARRAY(body) => body.ser(version, bytes),
37885            Self::DEBUG_VECT(body) => body.ser(version, bytes),
37886            Self::DISTANCE_SENSOR(body) => body.ser(version, bytes),
37887            Self::EFI_STATUS(body) => body.ser(version, bytes),
37888            Self::EKF_EXT(body) => body.ser(version, bytes),
37889            Self::ENCAPSULATED_DATA(body) => body.ser(version, bytes),
37890            Self::ESC_INFO(body) => body.ser(version, bytes),
37891            Self::ESC_STATUS(body) => body.ser(version, bytes),
37892            Self::ESTIMATOR_STATUS(body) => body.ser(version, bytes),
37893            Self::EVENT(body) => body.ser(version, bytes),
37894            Self::EXTENDED_SYS_STATE(body) => body.ser(version, bytes),
37895            Self::FENCE_STATUS(body) => body.ser(version, bytes),
37896            Self::FILE_TRANSFER_PROTOCOL(body) => body.ser(version, bytes),
37897            Self::FLIGHT_INFORMATION(body) => body.ser(version, bytes),
37898            Self::FOLLOW_TARGET(body) => body.ser(version, bytes),
37899            Self::FUEL_STATUS(body) => body.ser(version, bytes),
37900            Self::FW_SOARING_DATA(body) => body.ser(version, bytes),
37901            Self::GENERATOR_STATUS(body) => body.ser(version, bytes),
37902            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(body) => body.ser(version, bytes),
37903            Self::GIMBAL_DEVICE_INFORMATION(body) => body.ser(version, bytes),
37904            Self::GIMBAL_DEVICE_SET_ATTITUDE(body) => body.ser(version, bytes),
37905            Self::GIMBAL_MANAGER_INFORMATION(body) => body.ser(version, bytes),
37906            Self::GIMBAL_MANAGER_SET_ATTITUDE(body) => body.ser(version, bytes),
37907            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(body) => body.ser(version, bytes),
37908            Self::GIMBAL_MANAGER_SET_PITCHYAW(body) => body.ser(version, bytes),
37909            Self::GIMBAL_MANAGER_STATUS(body) => body.ser(version, bytes),
37910            Self::GLOBAL_POSITION_INT(body) => body.ser(version, bytes),
37911            Self::GLOBAL_POSITION_INT_COV(body) => body.ser(version, bytes),
37912            Self::GLOBAL_VISION_POSITION_ESTIMATE(body) => body.ser(version, bytes),
37913            Self::GPS2_RAW(body) => body.ser(version, bytes),
37914            Self::GPS2_RTK(body) => body.ser(version, bytes),
37915            Self::GPS_GLOBAL_ORIGIN(body) => body.ser(version, bytes),
37916            Self::GPS_INJECT_DATA(body) => body.ser(version, bytes),
37917            Self::GPS_INPUT(body) => body.ser(version, bytes),
37918            Self::GPS_RAW_INT(body) => body.ser(version, bytes),
37919            Self::GPS_RTCM_DATA(body) => body.ser(version, bytes),
37920            Self::GPS_RTK(body) => body.ser(version, bytes),
37921            Self::GPS_STATUS(body) => body.ser(version, bytes),
37922            Self::GSM_LINK_STATUS(body) => body.ser(version, bytes),
37923            Self::HEARTBEAT(body) => body.ser(version, bytes),
37924            Self::HIGHRES_IMU(body) => body.ser(version, bytes),
37925            Self::HIGH_LATENCY(body) => body.ser(version, bytes),
37926            Self::HIGH_LATENCY2(body) => body.ser(version, bytes),
37927            Self::HIL_ACTUATOR_CONTROLS(body) => body.ser(version, bytes),
37928            Self::HIL_CONTROLS(body) => body.ser(version, bytes),
37929            Self::HIL_GPS(body) => body.ser(version, bytes),
37930            Self::HIL_OPTICAL_FLOW(body) => body.ser(version, bytes),
37931            Self::HIL_RC_INPUTS_RAW(body) => body.ser(version, bytes),
37932            Self::HIL_SENSOR(body) => body.ser(version, bytes),
37933            Self::HIL_STATE(body) => body.ser(version, bytes),
37934            Self::HIL_STATE_QUATERNION(body) => body.ser(version, bytes),
37935            Self::HOME_POSITION(body) => body.ser(version, bytes),
37936            Self::HYGROMETER_SENSOR(body) => body.ser(version, bytes),
37937            Self::ILLUMINATOR_STATUS(body) => body.ser(version, bytes),
37938            Self::ISBD_LINK_STATUS(body) => body.ser(version, bytes),
37939            Self::LANDING_TARGET(body) => body.ser(version, bytes),
37940            Self::LINK_NODE_STATUS(body) => body.ser(version, bytes),
37941            Self::LOCAL_POSITION_NED(body) => body.ser(version, bytes),
37942            Self::LOCAL_POSITION_NED_COV(body) => body.ser(version, bytes),
37943            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(body) => body.ser(version, bytes),
37944            Self::LOGGING_ACK(body) => body.ser(version, bytes),
37945            Self::LOGGING_DATA(body) => body.ser(version, bytes),
37946            Self::LOGGING_DATA_ACKED(body) => body.ser(version, bytes),
37947            Self::LOG_DATA(body) => body.ser(version, bytes),
37948            Self::LOG_ENTRY(body) => body.ser(version, bytes),
37949            Self::LOG_ERASE(body) => body.ser(version, bytes),
37950            Self::LOG_REQUEST_DATA(body) => body.ser(version, bytes),
37951            Self::LOG_REQUEST_END(body) => body.ser(version, bytes),
37952            Self::LOG_REQUEST_LIST(body) => body.ser(version, bytes),
37953            Self::MAG_CAL_REPORT(body) => body.ser(version, bytes),
37954            Self::MANUAL_CONTROL(body) => body.ser(version, bytes),
37955            Self::MANUAL_SETPOINT(body) => body.ser(version, bytes),
37956            Self::MEMORY_VECT(body) => body.ser(version, bytes),
37957            Self::MESSAGE_INTERVAL(body) => body.ser(version, bytes),
37958            Self::MISSION_ACK(body) => body.ser(version, bytes),
37959            Self::MISSION_CLEAR_ALL(body) => body.ser(version, bytes),
37960            Self::MISSION_COUNT(body) => body.ser(version, bytes),
37961            Self::MISSION_CURRENT(body) => body.ser(version, bytes),
37962            Self::MISSION_ITEM(body) => body.ser(version, bytes),
37963            Self::MISSION_ITEM_INT(body) => body.ser(version, bytes),
37964            Self::MISSION_ITEM_REACHED(body) => body.ser(version, bytes),
37965            Self::MISSION_REQUEST(body) => body.ser(version, bytes),
37966            Self::MISSION_REQUEST_INT(body) => body.ser(version, bytes),
37967            Self::MISSION_REQUEST_LIST(body) => body.ser(version, bytes),
37968            Self::MISSION_REQUEST_PARTIAL_LIST(body) => body.ser(version, bytes),
37969            Self::MISSION_SET_CURRENT(body) => body.ser(version, bytes),
37970            Self::MISSION_WRITE_PARTIAL_LIST(body) => body.ser(version, bytes),
37971            Self::MOUNT_ORIENTATION(body) => body.ser(version, bytes),
37972            Self::NAMED_VALUE_FLOAT(body) => body.ser(version, bytes),
37973            Self::NAMED_VALUE_INT(body) => body.ser(version, bytes),
37974            Self::NAV_CONTROLLER_OUTPUT(body) => body.ser(version, bytes),
37975            Self::OBSTACLE_DISTANCE(body) => body.ser(version, bytes),
37976            Self::ODOMETRY(body) => body.ser(version, bytes),
37977            Self::ONBOARD_COMPUTER_STATUS(body) => body.ser(version, bytes),
37978            Self::OPEN_DRONE_ID_ARM_STATUS(body) => body.ser(version, bytes),
37979            Self::OPEN_DRONE_ID_AUTHENTICATION(body) => body.ser(version, bytes),
37980            Self::OPEN_DRONE_ID_BASIC_ID(body) => body.ser(version, bytes),
37981            Self::OPEN_DRONE_ID_LOCATION(body) => body.ser(version, bytes),
37982            Self::OPEN_DRONE_ID_MESSAGE_PACK(body) => body.ser(version, bytes),
37983            Self::OPEN_DRONE_ID_OPERATOR_ID(body) => body.ser(version, bytes),
37984            Self::OPEN_DRONE_ID_SELF_ID(body) => body.ser(version, bytes),
37985            Self::OPEN_DRONE_ID_SYSTEM(body) => body.ser(version, bytes),
37986            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(body) => body.ser(version, bytes),
37987            Self::OPTICAL_FLOW(body) => body.ser(version, bytes),
37988            Self::OPTICAL_FLOW_RAD(body) => body.ser(version, bytes),
37989            Self::ORBIT_EXECUTION_STATUS(body) => body.ser(version, bytes),
37990            Self::PARAM_EXT_ACK(body) => body.ser(version, bytes),
37991            Self::PARAM_EXT_REQUEST_LIST(body) => body.ser(version, bytes),
37992            Self::PARAM_EXT_REQUEST_READ(body) => body.ser(version, bytes),
37993            Self::PARAM_EXT_SET(body) => body.ser(version, bytes),
37994            Self::PARAM_EXT_VALUE(body) => body.ser(version, bytes),
37995            Self::PARAM_MAP_RC(body) => body.ser(version, bytes),
37996            Self::PARAM_REQUEST_LIST(body) => body.ser(version, bytes),
37997            Self::PARAM_REQUEST_READ(body) => body.ser(version, bytes),
37998            Self::PARAM_SET(body) => body.ser(version, bytes),
37999            Self::PARAM_VALUE(body) => body.ser(version, bytes),
38000            Self::PING(body) => body.ser(version, bytes),
38001            Self::PLAY_TUNE(body) => body.ser(version, bytes),
38002            Self::PLAY_TUNE_V2(body) => body.ser(version, bytes),
38003            Self::POSITION_TARGET_GLOBAL_INT(body) => body.ser(version, bytes),
38004            Self::POSITION_TARGET_LOCAL_NED(body) => body.ser(version, bytes),
38005            Self::POWER_STATUS(body) => body.ser(version, bytes),
38006            Self::PROTOCOL_VERSION(body) => body.ser(version, bytes),
38007            Self::RADIO_STATUS(body) => body.ser(version, bytes),
38008            Self::RAW_IMU(body) => body.ser(version, bytes),
38009            Self::RAW_PRESSURE(body) => body.ser(version, bytes),
38010            Self::RAW_RPM(body) => body.ser(version, bytes),
38011            Self::RC_CHANNELS(body) => body.ser(version, bytes),
38012            Self::RC_CHANNELS_OVERRIDE(body) => body.ser(version, bytes),
38013            Self::RC_CHANNELS_RAW(body) => body.ser(version, bytes),
38014            Self::RC_CHANNELS_SCALED(body) => body.ser(version, bytes),
38015            Self::REQUEST_DATA_STREAM(body) => body.ser(version, bytes),
38016            Self::REQUEST_EVENT(body) => body.ser(version, bytes),
38017            Self::RESOURCE_REQUEST(body) => body.ser(version, bytes),
38018            Self::RESPONSE_EVENT_ERROR(body) => body.ser(version, bytes),
38019            Self::SAFETY_ALLOWED_AREA(body) => body.ser(version, bytes),
38020            Self::SAFETY_SET_ALLOWED_AREA(body) => body.ser(version, bytes),
38021            Self::SATCOM_LINK_STATUS(body) => body.ser(version, bytes),
38022            Self::SCALED_IMU(body) => body.ser(version, bytes),
38023            Self::SCALED_IMU2(body) => body.ser(version, bytes),
38024            Self::SCALED_IMU3(body) => body.ser(version, bytes),
38025            Self::SCALED_PRESSURE(body) => body.ser(version, bytes),
38026            Self::SCALED_PRESSURE2(body) => body.ser(version, bytes),
38027            Self::SCALED_PRESSURE3(body) => body.ser(version, bytes),
38028            Self::SENSORPOD_STATUS(body) => body.ser(version, bytes),
38029            Self::SENSOR_AIRFLOW_ANGLES(body) => body.ser(version, bytes),
38030            Self::SENS_ATMOS(body) => body.ser(version, bytes),
38031            Self::SENS_BATMON(body) => body.ser(version, bytes),
38032            Self::SENS_MPPT(body) => body.ser(version, bytes),
38033            Self::SENS_POWER(body) => body.ser(version, bytes),
38034            Self::SENS_POWER_BOARD(body) => body.ser(version, bytes),
38035            Self::SERIAL_CONTROL(body) => body.ser(version, bytes),
38036            Self::SERVO_OUTPUT_RAW(body) => body.ser(version, bytes),
38037            Self::SETUP_SIGNING(body) => body.ser(version, bytes),
38038            Self::SET_ACTUATOR_CONTROL_TARGET(body) => body.ser(version, bytes),
38039            Self::SET_ATTITUDE_TARGET(body) => body.ser(version, bytes),
38040            Self::SET_GPS_GLOBAL_ORIGIN(body) => body.ser(version, bytes),
38041            Self::SET_HOME_POSITION(body) => body.ser(version, bytes),
38042            Self::SET_MODE(body) => body.ser(version, bytes),
38043            Self::SET_POSITION_TARGET_GLOBAL_INT(body) => body.ser(version, bytes),
38044            Self::SET_POSITION_TARGET_LOCAL_NED(body) => body.ser(version, bytes),
38045            Self::SIM_STATE(body) => body.ser(version, bytes),
38046            Self::SMART_BATTERY_INFO(body) => body.ser(version, bytes),
38047            Self::STATUSTEXT(body) => body.ser(version, bytes),
38048            Self::STORAGE_INFORMATION(body) => body.ser(version, bytes),
38049            Self::SUPPORTED_TUNES(body) => body.ser(version, bytes),
38050            Self::SYSTEM_TIME(body) => body.ser(version, bytes),
38051            Self::SYS_STATUS(body) => body.ser(version, bytes),
38052            Self::TERRAIN_CHECK(body) => body.ser(version, bytes),
38053            Self::TERRAIN_DATA(body) => body.ser(version, bytes),
38054            Self::TERRAIN_REPORT(body) => body.ser(version, bytes),
38055            Self::TERRAIN_REQUEST(body) => body.ser(version, bytes),
38056            Self::TIMESYNC(body) => body.ser(version, bytes),
38057            Self::TIME_ESTIMATE_TO_TARGET(body) => body.ser(version, bytes),
38058            Self::TRAJECTORY_REPRESENTATION_BEZIER(body) => body.ser(version, bytes),
38059            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(body) => body.ser(version, bytes),
38060            Self::TUNNEL(body) => body.ser(version, bytes),
38061            Self::UAVCAN_NODE_INFO(body) => body.ser(version, bytes),
38062            Self::UAVCAN_NODE_STATUS(body) => body.ser(version, bytes),
38063            Self::UTM_GLOBAL_POSITION(body) => body.ser(version, bytes),
38064            Self::V2_EXTENSION(body) => body.ser(version, bytes),
38065            Self::VFR_HUD(body) => body.ser(version, bytes),
38066            Self::VIBRATION(body) => body.ser(version, bytes),
38067            Self::VICON_POSITION_ESTIMATE(body) => body.ser(version, bytes),
38068            Self::VIDEO_STREAM_INFORMATION(body) => body.ser(version, bytes),
38069            Self::VIDEO_STREAM_STATUS(body) => body.ser(version, bytes),
38070            Self::VISION_POSITION_ESTIMATE(body) => body.ser(version, bytes),
38071            Self::VISION_SPEED_ESTIMATE(body) => body.ser(version, bytes),
38072            Self::WHEEL_DISTANCE(body) => body.ser(version, bytes),
38073            Self::WIFI_CONFIG_AP(body) => body.ser(version, bytes),
38074            Self::WINCH_STATUS(body) => body.ser(version, bytes),
38075            Self::WIND_COV(body) => body.ser(version, bytes),
38076        }
38077    }
38078    fn extra_crc(id: u32) -> u8 {
38079        match id {
38080            ACTUATOR_CONTROL_TARGET_DATA::ID => ACTUATOR_CONTROL_TARGET_DATA::EXTRA_CRC,
38081            ACTUATOR_OUTPUT_STATUS_DATA::ID => ACTUATOR_OUTPUT_STATUS_DATA::EXTRA_CRC,
38082            ADSB_VEHICLE_DATA::ID => ADSB_VEHICLE_DATA::EXTRA_CRC,
38083            AIS_VESSEL_DATA::ID => AIS_VESSEL_DATA::EXTRA_CRC,
38084            ALTITUDE_DATA::ID => ALTITUDE_DATA::EXTRA_CRC,
38085            ASLCTRL_DATA_DATA::ID => ASLCTRL_DATA_DATA::EXTRA_CRC,
38086            ASLCTRL_DEBUG_DATA::ID => ASLCTRL_DEBUG_DATA::EXTRA_CRC,
38087            ASLUAV_STATUS_DATA::ID => ASLUAV_STATUS_DATA::EXTRA_CRC,
38088            ASL_OBCTRL_DATA::ID => ASL_OBCTRL_DATA::EXTRA_CRC,
38089            ATTITUDE_DATA::ID => ATTITUDE_DATA::EXTRA_CRC,
38090            ATTITUDE_QUATERNION_DATA::ID => ATTITUDE_QUATERNION_DATA::EXTRA_CRC,
38091            ATTITUDE_QUATERNION_COV_DATA::ID => ATTITUDE_QUATERNION_COV_DATA::EXTRA_CRC,
38092            ATTITUDE_TARGET_DATA::ID => ATTITUDE_TARGET_DATA::EXTRA_CRC,
38093            ATT_POS_MOCAP_DATA::ID => ATT_POS_MOCAP_DATA::EXTRA_CRC,
38094            AUTH_KEY_DATA::ID => AUTH_KEY_DATA::EXTRA_CRC,
38095            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
38096                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::EXTRA_CRC
38097            }
38098            AUTOPILOT_VERSION_DATA::ID => AUTOPILOT_VERSION_DATA::EXTRA_CRC,
38099            AVAILABLE_MODES_DATA::ID => AVAILABLE_MODES_DATA::EXTRA_CRC,
38100            AVAILABLE_MODES_MONITOR_DATA::ID => AVAILABLE_MODES_MONITOR_DATA::EXTRA_CRC,
38101            BATTERY_INFO_DATA::ID => BATTERY_INFO_DATA::EXTRA_CRC,
38102            BATTERY_STATUS_DATA::ID => BATTERY_STATUS_DATA::EXTRA_CRC,
38103            BUTTON_CHANGE_DATA::ID => BUTTON_CHANGE_DATA::EXTRA_CRC,
38104            CAMERA_CAPTURE_STATUS_DATA::ID => CAMERA_CAPTURE_STATUS_DATA::EXTRA_CRC,
38105            CAMERA_FOV_STATUS_DATA::ID => CAMERA_FOV_STATUS_DATA::EXTRA_CRC,
38106            CAMERA_IMAGE_CAPTURED_DATA::ID => CAMERA_IMAGE_CAPTURED_DATA::EXTRA_CRC,
38107            CAMERA_INFORMATION_DATA::ID => CAMERA_INFORMATION_DATA::EXTRA_CRC,
38108            CAMERA_SETTINGS_DATA::ID => CAMERA_SETTINGS_DATA::EXTRA_CRC,
38109            CAMERA_THERMAL_RANGE_DATA::ID => CAMERA_THERMAL_RANGE_DATA::EXTRA_CRC,
38110            CAMERA_TRACKING_GEO_STATUS_DATA::ID => CAMERA_TRACKING_GEO_STATUS_DATA::EXTRA_CRC,
38111            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => CAMERA_TRACKING_IMAGE_STATUS_DATA::EXTRA_CRC,
38112            CAMERA_TRIGGER_DATA::ID => CAMERA_TRIGGER_DATA::EXTRA_CRC,
38113            CANFD_FRAME_DATA::ID => CANFD_FRAME_DATA::EXTRA_CRC,
38114            CAN_FILTER_MODIFY_DATA::ID => CAN_FILTER_MODIFY_DATA::EXTRA_CRC,
38115            CAN_FRAME_DATA::ID => CAN_FRAME_DATA::EXTRA_CRC,
38116            CELLULAR_CONFIG_DATA::ID => CELLULAR_CONFIG_DATA::EXTRA_CRC,
38117            CELLULAR_STATUS_DATA::ID => CELLULAR_STATUS_DATA::EXTRA_CRC,
38118            CHANGE_OPERATOR_CONTROL_DATA::ID => CHANGE_OPERATOR_CONTROL_DATA::EXTRA_CRC,
38119            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => CHANGE_OPERATOR_CONTROL_ACK_DATA::EXTRA_CRC,
38120            COLLISION_DATA::ID => COLLISION_DATA::EXTRA_CRC,
38121            COMMAND_ACK_DATA::ID => COMMAND_ACK_DATA::EXTRA_CRC,
38122            COMMAND_CANCEL_DATA::ID => COMMAND_CANCEL_DATA::EXTRA_CRC,
38123            COMMAND_INT_DATA::ID => COMMAND_INT_DATA::EXTRA_CRC,
38124            COMMAND_INT_STAMPED_DATA::ID => COMMAND_INT_STAMPED_DATA::EXTRA_CRC,
38125            COMMAND_LONG_DATA::ID => COMMAND_LONG_DATA::EXTRA_CRC,
38126            COMMAND_LONG_STAMPED_DATA::ID => COMMAND_LONG_STAMPED_DATA::EXTRA_CRC,
38127            COMPONENT_INFORMATION_DATA::ID => COMPONENT_INFORMATION_DATA::EXTRA_CRC,
38128            COMPONENT_INFORMATION_BASIC_DATA::ID => COMPONENT_INFORMATION_BASIC_DATA::EXTRA_CRC,
38129            COMPONENT_METADATA_DATA::ID => COMPONENT_METADATA_DATA::EXTRA_CRC,
38130            CONTROL_SYSTEM_STATE_DATA::ID => CONTROL_SYSTEM_STATE_DATA::EXTRA_CRC,
38131            CURRENT_EVENT_SEQUENCE_DATA::ID => CURRENT_EVENT_SEQUENCE_DATA::EXTRA_CRC,
38132            CURRENT_MODE_DATA::ID => CURRENT_MODE_DATA::EXTRA_CRC,
38133            DATA_STREAM_DATA::ID => DATA_STREAM_DATA::EXTRA_CRC,
38134            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => DATA_TRANSMISSION_HANDSHAKE_DATA::EXTRA_CRC,
38135            DEBUG_DATA::ID => DEBUG_DATA::EXTRA_CRC,
38136            DEBUG_FLOAT_ARRAY_DATA::ID => DEBUG_FLOAT_ARRAY_DATA::EXTRA_CRC,
38137            DEBUG_VECT_DATA::ID => DEBUG_VECT_DATA::EXTRA_CRC,
38138            DISTANCE_SENSOR_DATA::ID => DISTANCE_SENSOR_DATA::EXTRA_CRC,
38139            EFI_STATUS_DATA::ID => EFI_STATUS_DATA::EXTRA_CRC,
38140            EKF_EXT_DATA::ID => EKF_EXT_DATA::EXTRA_CRC,
38141            ENCAPSULATED_DATA_DATA::ID => ENCAPSULATED_DATA_DATA::EXTRA_CRC,
38142            ESC_INFO_DATA::ID => ESC_INFO_DATA::EXTRA_CRC,
38143            ESC_STATUS_DATA::ID => ESC_STATUS_DATA::EXTRA_CRC,
38144            ESTIMATOR_STATUS_DATA::ID => ESTIMATOR_STATUS_DATA::EXTRA_CRC,
38145            EVENT_DATA::ID => EVENT_DATA::EXTRA_CRC,
38146            EXTENDED_SYS_STATE_DATA::ID => EXTENDED_SYS_STATE_DATA::EXTRA_CRC,
38147            FENCE_STATUS_DATA::ID => FENCE_STATUS_DATA::EXTRA_CRC,
38148            FILE_TRANSFER_PROTOCOL_DATA::ID => FILE_TRANSFER_PROTOCOL_DATA::EXTRA_CRC,
38149            FLIGHT_INFORMATION_DATA::ID => FLIGHT_INFORMATION_DATA::EXTRA_CRC,
38150            FOLLOW_TARGET_DATA::ID => FOLLOW_TARGET_DATA::EXTRA_CRC,
38151            FUEL_STATUS_DATA::ID => FUEL_STATUS_DATA::EXTRA_CRC,
38152            FW_SOARING_DATA_DATA::ID => FW_SOARING_DATA_DATA::EXTRA_CRC,
38153            GENERATOR_STATUS_DATA::ID => GENERATOR_STATUS_DATA::EXTRA_CRC,
38154            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::EXTRA_CRC,
38155            GIMBAL_DEVICE_INFORMATION_DATA::ID => GIMBAL_DEVICE_INFORMATION_DATA::EXTRA_CRC,
38156            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => GIMBAL_DEVICE_SET_ATTITUDE_DATA::EXTRA_CRC,
38157            GIMBAL_MANAGER_INFORMATION_DATA::ID => GIMBAL_MANAGER_INFORMATION_DATA::EXTRA_CRC,
38158            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => GIMBAL_MANAGER_SET_ATTITUDE_DATA::EXTRA_CRC,
38159            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
38160                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::EXTRA_CRC
38161            }
38162            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => GIMBAL_MANAGER_SET_PITCHYAW_DATA::EXTRA_CRC,
38163            GIMBAL_MANAGER_STATUS_DATA::ID => GIMBAL_MANAGER_STATUS_DATA::EXTRA_CRC,
38164            GLOBAL_POSITION_INT_DATA::ID => GLOBAL_POSITION_INT_DATA::EXTRA_CRC,
38165            GLOBAL_POSITION_INT_COV_DATA::ID => GLOBAL_POSITION_INT_COV_DATA::EXTRA_CRC,
38166            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
38167                GLOBAL_VISION_POSITION_ESTIMATE_DATA::EXTRA_CRC
38168            }
38169            GPS2_RAW_DATA::ID => GPS2_RAW_DATA::EXTRA_CRC,
38170            GPS2_RTK_DATA::ID => GPS2_RTK_DATA::EXTRA_CRC,
38171            GPS_GLOBAL_ORIGIN_DATA::ID => GPS_GLOBAL_ORIGIN_DATA::EXTRA_CRC,
38172            GPS_INJECT_DATA_DATA::ID => GPS_INJECT_DATA_DATA::EXTRA_CRC,
38173            GPS_INPUT_DATA::ID => GPS_INPUT_DATA::EXTRA_CRC,
38174            GPS_RAW_INT_DATA::ID => GPS_RAW_INT_DATA::EXTRA_CRC,
38175            GPS_RTCM_DATA_DATA::ID => GPS_RTCM_DATA_DATA::EXTRA_CRC,
38176            GPS_RTK_DATA::ID => GPS_RTK_DATA::EXTRA_CRC,
38177            GPS_STATUS_DATA::ID => GPS_STATUS_DATA::EXTRA_CRC,
38178            GSM_LINK_STATUS_DATA::ID => GSM_LINK_STATUS_DATA::EXTRA_CRC,
38179            HEARTBEAT_DATA::ID => HEARTBEAT_DATA::EXTRA_CRC,
38180            HIGHRES_IMU_DATA::ID => HIGHRES_IMU_DATA::EXTRA_CRC,
38181            HIGH_LATENCY_DATA::ID => HIGH_LATENCY_DATA::EXTRA_CRC,
38182            HIGH_LATENCY2_DATA::ID => HIGH_LATENCY2_DATA::EXTRA_CRC,
38183            HIL_ACTUATOR_CONTROLS_DATA::ID => HIL_ACTUATOR_CONTROLS_DATA::EXTRA_CRC,
38184            HIL_CONTROLS_DATA::ID => HIL_CONTROLS_DATA::EXTRA_CRC,
38185            HIL_GPS_DATA::ID => HIL_GPS_DATA::EXTRA_CRC,
38186            HIL_OPTICAL_FLOW_DATA::ID => HIL_OPTICAL_FLOW_DATA::EXTRA_CRC,
38187            HIL_RC_INPUTS_RAW_DATA::ID => HIL_RC_INPUTS_RAW_DATA::EXTRA_CRC,
38188            HIL_SENSOR_DATA::ID => HIL_SENSOR_DATA::EXTRA_CRC,
38189            HIL_STATE_DATA::ID => HIL_STATE_DATA::EXTRA_CRC,
38190            HIL_STATE_QUATERNION_DATA::ID => HIL_STATE_QUATERNION_DATA::EXTRA_CRC,
38191            HOME_POSITION_DATA::ID => HOME_POSITION_DATA::EXTRA_CRC,
38192            HYGROMETER_SENSOR_DATA::ID => HYGROMETER_SENSOR_DATA::EXTRA_CRC,
38193            ILLUMINATOR_STATUS_DATA::ID => ILLUMINATOR_STATUS_DATA::EXTRA_CRC,
38194            ISBD_LINK_STATUS_DATA::ID => ISBD_LINK_STATUS_DATA::EXTRA_CRC,
38195            LANDING_TARGET_DATA::ID => LANDING_TARGET_DATA::EXTRA_CRC,
38196            LINK_NODE_STATUS_DATA::ID => LINK_NODE_STATUS_DATA::EXTRA_CRC,
38197            LOCAL_POSITION_NED_DATA::ID => LOCAL_POSITION_NED_DATA::EXTRA_CRC,
38198            LOCAL_POSITION_NED_COV_DATA::ID => LOCAL_POSITION_NED_COV_DATA::EXTRA_CRC,
38199            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
38200                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::EXTRA_CRC
38201            }
38202            LOGGING_ACK_DATA::ID => LOGGING_ACK_DATA::EXTRA_CRC,
38203            LOGGING_DATA_DATA::ID => LOGGING_DATA_DATA::EXTRA_CRC,
38204            LOGGING_DATA_ACKED_DATA::ID => LOGGING_DATA_ACKED_DATA::EXTRA_CRC,
38205            LOG_DATA_DATA::ID => LOG_DATA_DATA::EXTRA_CRC,
38206            LOG_ENTRY_DATA::ID => LOG_ENTRY_DATA::EXTRA_CRC,
38207            LOG_ERASE_DATA::ID => LOG_ERASE_DATA::EXTRA_CRC,
38208            LOG_REQUEST_DATA_DATA::ID => LOG_REQUEST_DATA_DATA::EXTRA_CRC,
38209            LOG_REQUEST_END_DATA::ID => LOG_REQUEST_END_DATA::EXTRA_CRC,
38210            LOG_REQUEST_LIST_DATA::ID => LOG_REQUEST_LIST_DATA::EXTRA_CRC,
38211            MAG_CAL_REPORT_DATA::ID => MAG_CAL_REPORT_DATA::EXTRA_CRC,
38212            MANUAL_CONTROL_DATA::ID => MANUAL_CONTROL_DATA::EXTRA_CRC,
38213            MANUAL_SETPOINT_DATA::ID => MANUAL_SETPOINT_DATA::EXTRA_CRC,
38214            MEMORY_VECT_DATA::ID => MEMORY_VECT_DATA::EXTRA_CRC,
38215            MESSAGE_INTERVAL_DATA::ID => MESSAGE_INTERVAL_DATA::EXTRA_CRC,
38216            MISSION_ACK_DATA::ID => MISSION_ACK_DATA::EXTRA_CRC,
38217            MISSION_CLEAR_ALL_DATA::ID => MISSION_CLEAR_ALL_DATA::EXTRA_CRC,
38218            MISSION_COUNT_DATA::ID => MISSION_COUNT_DATA::EXTRA_CRC,
38219            MISSION_CURRENT_DATA::ID => MISSION_CURRENT_DATA::EXTRA_CRC,
38220            MISSION_ITEM_DATA::ID => MISSION_ITEM_DATA::EXTRA_CRC,
38221            MISSION_ITEM_INT_DATA::ID => MISSION_ITEM_INT_DATA::EXTRA_CRC,
38222            MISSION_ITEM_REACHED_DATA::ID => MISSION_ITEM_REACHED_DATA::EXTRA_CRC,
38223            MISSION_REQUEST_DATA::ID => MISSION_REQUEST_DATA::EXTRA_CRC,
38224            MISSION_REQUEST_INT_DATA::ID => MISSION_REQUEST_INT_DATA::EXTRA_CRC,
38225            MISSION_REQUEST_LIST_DATA::ID => MISSION_REQUEST_LIST_DATA::EXTRA_CRC,
38226            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => MISSION_REQUEST_PARTIAL_LIST_DATA::EXTRA_CRC,
38227            MISSION_SET_CURRENT_DATA::ID => MISSION_SET_CURRENT_DATA::EXTRA_CRC,
38228            MISSION_WRITE_PARTIAL_LIST_DATA::ID => MISSION_WRITE_PARTIAL_LIST_DATA::EXTRA_CRC,
38229            MOUNT_ORIENTATION_DATA::ID => MOUNT_ORIENTATION_DATA::EXTRA_CRC,
38230            NAMED_VALUE_FLOAT_DATA::ID => NAMED_VALUE_FLOAT_DATA::EXTRA_CRC,
38231            NAMED_VALUE_INT_DATA::ID => NAMED_VALUE_INT_DATA::EXTRA_CRC,
38232            NAV_CONTROLLER_OUTPUT_DATA::ID => NAV_CONTROLLER_OUTPUT_DATA::EXTRA_CRC,
38233            OBSTACLE_DISTANCE_DATA::ID => OBSTACLE_DISTANCE_DATA::EXTRA_CRC,
38234            ODOMETRY_DATA::ID => ODOMETRY_DATA::EXTRA_CRC,
38235            ONBOARD_COMPUTER_STATUS_DATA::ID => ONBOARD_COMPUTER_STATUS_DATA::EXTRA_CRC,
38236            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => OPEN_DRONE_ID_ARM_STATUS_DATA::EXTRA_CRC,
38237            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => OPEN_DRONE_ID_AUTHENTICATION_DATA::EXTRA_CRC,
38238            OPEN_DRONE_ID_BASIC_ID_DATA::ID => OPEN_DRONE_ID_BASIC_ID_DATA::EXTRA_CRC,
38239            OPEN_DRONE_ID_LOCATION_DATA::ID => OPEN_DRONE_ID_LOCATION_DATA::EXTRA_CRC,
38240            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => OPEN_DRONE_ID_MESSAGE_PACK_DATA::EXTRA_CRC,
38241            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => OPEN_DRONE_ID_OPERATOR_ID_DATA::EXTRA_CRC,
38242            OPEN_DRONE_ID_SELF_ID_DATA::ID => OPEN_DRONE_ID_SELF_ID_DATA::EXTRA_CRC,
38243            OPEN_DRONE_ID_SYSTEM_DATA::ID => OPEN_DRONE_ID_SYSTEM_DATA::EXTRA_CRC,
38244            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::EXTRA_CRC,
38245            OPTICAL_FLOW_DATA::ID => OPTICAL_FLOW_DATA::EXTRA_CRC,
38246            OPTICAL_FLOW_RAD_DATA::ID => OPTICAL_FLOW_RAD_DATA::EXTRA_CRC,
38247            ORBIT_EXECUTION_STATUS_DATA::ID => ORBIT_EXECUTION_STATUS_DATA::EXTRA_CRC,
38248            PARAM_EXT_ACK_DATA::ID => PARAM_EXT_ACK_DATA::EXTRA_CRC,
38249            PARAM_EXT_REQUEST_LIST_DATA::ID => PARAM_EXT_REQUEST_LIST_DATA::EXTRA_CRC,
38250            PARAM_EXT_REQUEST_READ_DATA::ID => PARAM_EXT_REQUEST_READ_DATA::EXTRA_CRC,
38251            PARAM_EXT_SET_DATA::ID => PARAM_EXT_SET_DATA::EXTRA_CRC,
38252            PARAM_EXT_VALUE_DATA::ID => PARAM_EXT_VALUE_DATA::EXTRA_CRC,
38253            PARAM_MAP_RC_DATA::ID => PARAM_MAP_RC_DATA::EXTRA_CRC,
38254            PARAM_REQUEST_LIST_DATA::ID => PARAM_REQUEST_LIST_DATA::EXTRA_CRC,
38255            PARAM_REQUEST_READ_DATA::ID => PARAM_REQUEST_READ_DATA::EXTRA_CRC,
38256            PARAM_SET_DATA::ID => PARAM_SET_DATA::EXTRA_CRC,
38257            PARAM_VALUE_DATA::ID => PARAM_VALUE_DATA::EXTRA_CRC,
38258            PING_DATA::ID => PING_DATA::EXTRA_CRC,
38259            PLAY_TUNE_DATA::ID => PLAY_TUNE_DATA::EXTRA_CRC,
38260            PLAY_TUNE_V2_DATA::ID => PLAY_TUNE_V2_DATA::EXTRA_CRC,
38261            POSITION_TARGET_GLOBAL_INT_DATA::ID => POSITION_TARGET_GLOBAL_INT_DATA::EXTRA_CRC,
38262            POSITION_TARGET_LOCAL_NED_DATA::ID => POSITION_TARGET_LOCAL_NED_DATA::EXTRA_CRC,
38263            POWER_STATUS_DATA::ID => POWER_STATUS_DATA::EXTRA_CRC,
38264            PROTOCOL_VERSION_DATA::ID => PROTOCOL_VERSION_DATA::EXTRA_CRC,
38265            RADIO_STATUS_DATA::ID => RADIO_STATUS_DATA::EXTRA_CRC,
38266            RAW_IMU_DATA::ID => RAW_IMU_DATA::EXTRA_CRC,
38267            RAW_PRESSURE_DATA::ID => RAW_PRESSURE_DATA::EXTRA_CRC,
38268            RAW_RPM_DATA::ID => RAW_RPM_DATA::EXTRA_CRC,
38269            RC_CHANNELS_DATA::ID => RC_CHANNELS_DATA::EXTRA_CRC,
38270            RC_CHANNELS_OVERRIDE_DATA::ID => RC_CHANNELS_OVERRIDE_DATA::EXTRA_CRC,
38271            RC_CHANNELS_RAW_DATA::ID => RC_CHANNELS_RAW_DATA::EXTRA_CRC,
38272            RC_CHANNELS_SCALED_DATA::ID => RC_CHANNELS_SCALED_DATA::EXTRA_CRC,
38273            REQUEST_DATA_STREAM_DATA::ID => REQUEST_DATA_STREAM_DATA::EXTRA_CRC,
38274            REQUEST_EVENT_DATA::ID => REQUEST_EVENT_DATA::EXTRA_CRC,
38275            RESOURCE_REQUEST_DATA::ID => RESOURCE_REQUEST_DATA::EXTRA_CRC,
38276            RESPONSE_EVENT_ERROR_DATA::ID => RESPONSE_EVENT_ERROR_DATA::EXTRA_CRC,
38277            SAFETY_ALLOWED_AREA_DATA::ID => SAFETY_ALLOWED_AREA_DATA::EXTRA_CRC,
38278            SAFETY_SET_ALLOWED_AREA_DATA::ID => SAFETY_SET_ALLOWED_AREA_DATA::EXTRA_CRC,
38279            SATCOM_LINK_STATUS_DATA::ID => SATCOM_LINK_STATUS_DATA::EXTRA_CRC,
38280            SCALED_IMU_DATA::ID => SCALED_IMU_DATA::EXTRA_CRC,
38281            SCALED_IMU2_DATA::ID => SCALED_IMU2_DATA::EXTRA_CRC,
38282            SCALED_IMU3_DATA::ID => SCALED_IMU3_DATA::EXTRA_CRC,
38283            SCALED_PRESSURE_DATA::ID => SCALED_PRESSURE_DATA::EXTRA_CRC,
38284            SCALED_PRESSURE2_DATA::ID => SCALED_PRESSURE2_DATA::EXTRA_CRC,
38285            SCALED_PRESSURE3_DATA::ID => SCALED_PRESSURE3_DATA::EXTRA_CRC,
38286            SENSORPOD_STATUS_DATA::ID => SENSORPOD_STATUS_DATA::EXTRA_CRC,
38287            SENSOR_AIRFLOW_ANGLES_DATA::ID => SENSOR_AIRFLOW_ANGLES_DATA::EXTRA_CRC,
38288            SENS_ATMOS_DATA::ID => SENS_ATMOS_DATA::EXTRA_CRC,
38289            SENS_BATMON_DATA::ID => SENS_BATMON_DATA::EXTRA_CRC,
38290            SENS_MPPT_DATA::ID => SENS_MPPT_DATA::EXTRA_CRC,
38291            SENS_POWER_DATA::ID => SENS_POWER_DATA::EXTRA_CRC,
38292            SENS_POWER_BOARD_DATA::ID => SENS_POWER_BOARD_DATA::EXTRA_CRC,
38293            SERIAL_CONTROL_DATA::ID => SERIAL_CONTROL_DATA::EXTRA_CRC,
38294            SERVO_OUTPUT_RAW_DATA::ID => SERVO_OUTPUT_RAW_DATA::EXTRA_CRC,
38295            SETUP_SIGNING_DATA::ID => SETUP_SIGNING_DATA::EXTRA_CRC,
38296            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => SET_ACTUATOR_CONTROL_TARGET_DATA::EXTRA_CRC,
38297            SET_ATTITUDE_TARGET_DATA::ID => SET_ATTITUDE_TARGET_DATA::EXTRA_CRC,
38298            SET_GPS_GLOBAL_ORIGIN_DATA::ID => SET_GPS_GLOBAL_ORIGIN_DATA::EXTRA_CRC,
38299            SET_HOME_POSITION_DATA::ID => SET_HOME_POSITION_DATA::EXTRA_CRC,
38300            SET_MODE_DATA::ID => SET_MODE_DATA::EXTRA_CRC,
38301            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => {
38302                SET_POSITION_TARGET_GLOBAL_INT_DATA::EXTRA_CRC
38303            }
38304            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => SET_POSITION_TARGET_LOCAL_NED_DATA::EXTRA_CRC,
38305            SIM_STATE_DATA::ID => SIM_STATE_DATA::EXTRA_CRC,
38306            SMART_BATTERY_INFO_DATA::ID => SMART_BATTERY_INFO_DATA::EXTRA_CRC,
38307            STATUSTEXT_DATA::ID => STATUSTEXT_DATA::EXTRA_CRC,
38308            STORAGE_INFORMATION_DATA::ID => STORAGE_INFORMATION_DATA::EXTRA_CRC,
38309            SUPPORTED_TUNES_DATA::ID => SUPPORTED_TUNES_DATA::EXTRA_CRC,
38310            SYSTEM_TIME_DATA::ID => SYSTEM_TIME_DATA::EXTRA_CRC,
38311            SYS_STATUS_DATA::ID => SYS_STATUS_DATA::EXTRA_CRC,
38312            TERRAIN_CHECK_DATA::ID => TERRAIN_CHECK_DATA::EXTRA_CRC,
38313            TERRAIN_DATA_DATA::ID => TERRAIN_DATA_DATA::EXTRA_CRC,
38314            TERRAIN_REPORT_DATA::ID => TERRAIN_REPORT_DATA::EXTRA_CRC,
38315            TERRAIN_REQUEST_DATA::ID => TERRAIN_REQUEST_DATA::EXTRA_CRC,
38316            TIMESYNC_DATA::ID => TIMESYNC_DATA::EXTRA_CRC,
38317            TIME_ESTIMATE_TO_TARGET_DATA::ID => TIME_ESTIMATE_TO_TARGET_DATA::EXTRA_CRC,
38318            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
38319                TRAJECTORY_REPRESENTATION_BEZIER_DATA::EXTRA_CRC
38320            }
38321            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
38322                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::EXTRA_CRC
38323            }
38324            TUNNEL_DATA::ID => TUNNEL_DATA::EXTRA_CRC,
38325            UAVCAN_NODE_INFO_DATA::ID => UAVCAN_NODE_INFO_DATA::EXTRA_CRC,
38326            UAVCAN_NODE_STATUS_DATA::ID => UAVCAN_NODE_STATUS_DATA::EXTRA_CRC,
38327            UTM_GLOBAL_POSITION_DATA::ID => UTM_GLOBAL_POSITION_DATA::EXTRA_CRC,
38328            V2_EXTENSION_DATA::ID => V2_EXTENSION_DATA::EXTRA_CRC,
38329            VFR_HUD_DATA::ID => VFR_HUD_DATA::EXTRA_CRC,
38330            VIBRATION_DATA::ID => VIBRATION_DATA::EXTRA_CRC,
38331            VICON_POSITION_ESTIMATE_DATA::ID => VICON_POSITION_ESTIMATE_DATA::EXTRA_CRC,
38332            VIDEO_STREAM_INFORMATION_DATA::ID => VIDEO_STREAM_INFORMATION_DATA::EXTRA_CRC,
38333            VIDEO_STREAM_STATUS_DATA::ID => VIDEO_STREAM_STATUS_DATA::EXTRA_CRC,
38334            VISION_POSITION_ESTIMATE_DATA::ID => VISION_POSITION_ESTIMATE_DATA::EXTRA_CRC,
38335            VISION_SPEED_ESTIMATE_DATA::ID => VISION_SPEED_ESTIMATE_DATA::EXTRA_CRC,
38336            WHEEL_DISTANCE_DATA::ID => WHEEL_DISTANCE_DATA::EXTRA_CRC,
38337            WIFI_CONFIG_AP_DATA::ID => WIFI_CONFIG_AP_DATA::EXTRA_CRC,
38338            WINCH_STATUS_DATA::ID => WINCH_STATUS_DATA::EXTRA_CRC,
38339            WIND_COV_DATA::ID => WIND_COV_DATA::EXTRA_CRC,
38340            _ => 0,
38341        }
38342    }
38343    fn target_system_id(&self) -> Option<u8> {
38344        match self {
38345            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(inner) => Some(inner.target_system),
38346            Self::CANFD_FRAME(inner) => Some(inner.target_system),
38347            Self::CAN_FILTER_MODIFY(inner) => Some(inner.target_system),
38348            Self::CAN_FRAME(inner) => Some(inner.target_system),
38349            Self::CHANGE_OPERATOR_CONTROL(inner) => Some(inner.target_system),
38350            Self::COMMAND_ACK(inner) => Some(inner.target_system),
38351            Self::COMMAND_CANCEL(inner) => Some(inner.target_system),
38352            Self::COMMAND_INT(inner) => Some(inner.target_system),
38353            Self::COMMAND_INT_STAMPED(inner) => Some(inner.target_system),
38354            Self::COMMAND_LONG(inner) => Some(inner.target_system),
38355            Self::COMMAND_LONG_STAMPED(inner) => Some(inner.target_system),
38356            Self::FILE_TRANSFER_PROTOCOL(inner) => Some(inner.target_system),
38357            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(inner) => Some(inner.target_system),
38358            Self::GIMBAL_DEVICE_SET_ATTITUDE(inner) => Some(inner.target_system),
38359            Self::GIMBAL_MANAGER_SET_ATTITUDE(inner) => Some(inner.target_system),
38360            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(inner) => Some(inner.target_system),
38361            Self::GIMBAL_MANAGER_SET_PITCHYAW(inner) => Some(inner.target_system),
38362            Self::GPS_INJECT_DATA(inner) => Some(inner.target_system),
38363            Self::LOGGING_ACK(inner) => Some(inner.target_system),
38364            Self::LOGGING_DATA(inner) => Some(inner.target_system),
38365            Self::LOGGING_DATA_ACKED(inner) => Some(inner.target_system),
38366            Self::LOG_ERASE(inner) => Some(inner.target_system),
38367            Self::LOG_REQUEST_DATA(inner) => Some(inner.target_system),
38368            Self::LOG_REQUEST_END(inner) => Some(inner.target_system),
38369            Self::LOG_REQUEST_LIST(inner) => Some(inner.target_system),
38370            Self::MISSION_ACK(inner) => Some(inner.target_system),
38371            Self::MISSION_CLEAR_ALL(inner) => Some(inner.target_system),
38372            Self::MISSION_COUNT(inner) => Some(inner.target_system),
38373            Self::MISSION_ITEM(inner) => Some(inner.target_system),
38374            Self::MISSION_ITEM_INT(inner) => Some(inner.target_system),
38375            Self::MISSION_REQUEST(inner) => Some(inner.target_system),
38376            Self::MISSION_REQUEST_INT(inner) => Some(inner.target_system),
38377            Self::MISSION_REQUEST_LIST(inner) => Some(inner.target_system),
38378            Self::MISSION_REQUEST_PARTIAL_LIST(inner) => Some(inner.target_system),
38379            Self::MISSION_SET_CURRENT(inner) => Some(inner.target_system),
38380            Self::MISSION_WRITE_PARTIAL_LIST(inner) => Some(inner.target_system),
38381            Self::OPEN_DRONE_ID_AUTHENTICATION(inner) => Some(inner.target_system),
38382            Self::OPEN_DRONE_ID_BASIC_ID(inner) => Some(inner.target_system),
38383            Self::OPEN_DRONE_ID_LOCATION(inner) => Some(inner.target_system),
38384            Self::OPEN_DRONE_ID_MESSAGE_PACK(inner) => Some(inner.target_system),
38385            Self::OPEN_DRONE_ID_OPERATOR_ID(inner) => Some(inner.target_system),
38386            Self::OPEN_DRONE_ID_SELF_ID(inner) => Some(inner.target_system),
38387            Self::OPEN_DRONE_ID_SYSTEM(inner) => Some(inner.target_system),
38388            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(inner) => Some(inner.target_system),
38389            Self::PARAM_EXT_REQUEST_LIST(inner) => Some(inner.target_system),
38390            Self::PARAM_EXT_REQUEST_READ(inner) => Some(inner.target_system),
38391            Self::PARAM_EXT_SET(inner) => Some(inner.target_system),
38392            Self::PARAM_MAP_RC(inner) => Some(inner.target_system),
38393            Self::PARAM_REQUEST_LIST(inner) => Some(inner.target_system),
38394            Self::PARAM_REQUEST_READ(inner) => Some(inner.target_system),
38395            Self::PARAM_SET(inner) => Some(inner.target_system),
38396            Self::PING(inner) => Some(inner.target_system),
38397            Self::PLAY_TUNE(inner) => Some(inner.target_system),
38398            Self::PLAY_TUNE_V2(inner) => Some(inner.target_system),
38399            Self::RC_CHANNELS_OVERRIDE(inner) => Some(inner.target_system),
38400            Self::REQUEST_DATA_STREAM(inner) => Some(inner.target_system),
38401            Self::REQUEST_EVENT(inner) => Some(inner.target_system),
38402            Self::RESPONSE_EVENT_ERROR(inner) => Some(inner.target_system),
38403            Self::SAFETY_SET_ALLOWED_AREA(inner) => Some(inner.target_system),
38404            Self::SERIAL_CONTROL(inner) => Some(inner.target_system),
38405            Self::SETUP_SIGNING(inner) => Some(inner.target_system),
38406            Self::SET_ACTUATOR_CONTROL_TARGET(inner) => Some(inner.target_system),
38407            Self::SET_ATTITUDE_TARGET(inner) => Some(inner.target_system),
38408            Self::SET_GPS_GLOBAL_ORIGIN(inner) => Some(inner.target_system),
38409            Self::SET_HOME_POSITION(inner) => Some(inner.target_system),
38410            Self::SET_MODE(inner) => Some(inner.target_system),
38411            Self::SET_POSITION_TARGET_GLOBAL_INT(inner) => Some(inner.target_system),
38412            Self::SET_POSITION_TARGET_LOCAL_NED(inner) => Some(inner.target_system),
38413            Self::SUPPORTED_TUNES(inner) => Some(inner.target_system),
38414            Self::TIMESYNC(inner) => Some(inner.target_system),
38415            Self::TUNNEL(inner) => Some(inner.target_system),
38416            Self::V2_EXTENSION(inner) => Some(inner.target_system),
38417            _ => None,
38418        }
38419    }
38420    fn target_component_id(&self) -> Option<u8> {
38421        match self {
38422            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(inner) => Some(inner.target_component),
38423            Self::CANFD_FRAME(inner) => Some(inner.target_component),
38424            Self::CAN_FILTER_MODIFY(inner) => Some(inner.target_component),
38425            Self::CAN_FRAME(inner) => Some(inner.target_component),
38426            Self::COMMAND_ACK(inner) => Some(inner.target_component),
38427            Self::COMMAND_CANCEL(inner) => Some(inner.target_component),
38428            Self::COMMAND_INT(inner) => Some(inner.target_component),
38429            Self::COMMAND_INT_STAMPED(inner) => Some(inner.target_component),
38430            Self::COMMAND_LONG(inner) => Some(inner.target_component),
38431            Self::COMMAND_LONG_STAMPED(inner) => Some(inner.target_component),
38432            Self::FILE_TRANSFER_PROTOCOL(inner) => Some(inner.target_component),
38433            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(inner) => Some(inner.target_component),
38434            Self::GIMBAL_DEVICE_SET_ATTITUDE(inner) => Some(inner.target_component),
38435            Self::GIMBAL_MANAGER_SET_ATTITUDE(inner) => Some(inner.target_component),
38436            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(inner) => Some(inner.target_component),
38437            Self::GIMBAL_MANAGER_SET_PITCHYAW(inner) => Some(inner.target_component),
38438            Self::GPS_INJECT_DATA(inner) => Some(inner.target_component),
38439            Self::LOGGING_ACK(inner) => Some(inner.target_component),
38440            Self::LOGGING_DATA(inner) => Some(inner.target_component),
38441            Self::LOGGING_DATA_ACKED(inner) => Some(inner.target_component),
38442            Self::LOG_ERASE(inner) => Some(inner.target_component),
38443            Self::LOG_REQUEST_DATA(inner) => Some(inner.target_component),
38444            Self::LOG_REQUEST_END(inner) => Some(inner.target_component),
38445            Self::LOG_REQUEST_LIST(inner) => Some(inner.target_component),
38446            Self::MISSION_ACK(inner) => Some(inner.target_component),
38447            Self::MISSION_CLEAR_ALL(inner) => Some(inner.target_component),
38448            Self::MISSION_COUNT(inner) => Some(inner.target_component),
38449            Self::MISSION_ITEM(inner) => Some(inner.target_component),
38450            Self::MISSION_ITEM_INT(inner) => Some(inner.target_component),
38451            Self::MISSION_REQUEST(inner) => Some(inner.target_component),
38452            Self::MISSION_REQUEST_INT(inner) => Some(inner.target_component),
38453            Self::MISSION_REQUEST_LIST(inner) => Some(inner.target_component),
38454            Self::MISSION_REQUEST_PARTIAL_LIST(inner) => Some(inner.target_component),
38455            Self::MISSION_SET_CURRENT(inner) => Some(inner.target_component),
38456            Self::MISSION_WRITE_PARTIAL_LIST(inner) => Some(inner.target_component),
38457            Self::OPEN_DRONE_ID_AUTHENTICATION(inner) => Some(inner.target_component),
38458            Self::OPEN_DRONE_ID_BASIC_ID(inner) => Some(inner.target_component),
38459            Self::OPEN_DRONE_ID_LOCATION(inner) => Some(inner.target_component),
38460            Self::OPEN_DRONE_ID_MESSAGE_PACK(inner) => Some(inner.target_component),
38461            Self::OPEN_DRONE_ID_OPERATOR_ID(inner) => Some(inner.target_component),
38462            Self::OPEN_DRONE_ID_SELF_ID(inner) => Some(inner.target_component),
38463            Self::OPEN_DRONE_ID_SYSTEM(inner) => Some(inner.target_component),
38464            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(inner) => Some(inner.target_component),
38465            Self::PARAM_EXT_REQUEST_LIST(inner) => Some(inner.target_component),
38466            Self::PARAM_EXT_REQUEST_READ(inner) => Some(inner.target_component),
38467            Self::PARAM_EXT_SET(inner) => Some(inner.target_component),
38468            Self::PARAM_MAP_RC(inner) => Some(inner.target_component),
38469            Self::PARAM_REQUEST_LIST(inner) => Some(inner.target_component),
38470            Self::PARAM_REQUEST_READ(inner) => Some(inner.target_component),
38471            Self::PARAM_SET(inner) => Some(inner.target_component),
38472            Self::PING(inner) => Some(inner.target_component),
38473            Self::PLAY_TUNE(inner) => Some(inner.target_component),
38474            Self::PLAY_TUNE_V2(inner) => Some(inner.target_component),
38475            Self::RC_CHANNELS_OVERRIDE(inner) => Some(inner.target_component),
38476            Self::REQUEST_DATA_STREAM(inner) => Some(inner.target_component),
38477            Self::REQUEST_EVENT(inner) => Some(inner.target_component),
38478            Self::RESPONSE_EVENT_ERROR(inner) => Some(inner.target_component),
38479            Self::SAFETY_SET_ALLOWED_AREA(inner) => Some(inner.target_component),
38480            Self::SERIAL_CONTROL(inner) => Some(inner.target_component),
38481            Self::SETUP_SIGNING(inner) => Some(inner.target_component),
38482            Self::SET_ACTUATOR_CONTROL_TARGET(inner) => Some(inner.target_component),
38483            Self::SET_ATTITUDE_TARGET(inner) => Some(inner.target_component),
38484            Self::SET_POSITION_TARGET_GLOBAL_INT(inner) => Some(inner.target_component),
38485            Self::SET_POSITION_TARGET_LOCAL_NED(inner) => Some(inner.target_component),
38486            Self::SUPPORTED_TUNES(inner) => Some(inner.target_component),
38487            Self::TIMESYNC(inner) => Some(inner.target_component),
38488            Self::TUNNEL(inner) => Some(inner.target_component),
38489            Self::V2_EXTENSION(inner) => Some(inner.target_component),
38490            _ => None,
38491        }
38492    }
38493}